HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
MySQL Functions : Return the first non-null value in a list
The COALESCE() function returns the first non-null value in a list.
COALESCE(val1, val2, ...., val_n)
Parameter | Description |
---|---|
val1, val2, val_n | Required. The values to test |
Works in: | From MySQL 4.0 |
---|
Return the first non-null value in a list:
SELECT
COALESCE(NULL, 1, 2, 'W3C');