The COALESCE function takes a set of inputs and returns the first non-null value.
Syntax:
COALESCE(val1,val2,val3,……,nth val)
Example:
SELECT COALESCE(NULL, 1, 2, ‘MYSQL’)
Output:
1
What is a Stored Procedure ? A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again. S...
No comments:
Post a Comment