This is a discussion on COALESCE within the MySQL Database forums, part of the Database Forums category; Dear MySQLers, I have a guide for MySQL and it doesn't mention the COALESCE command at all or how ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"Michael Dunn" <michaelsinai@comcast.net> wrote in
news:9a6dncmPrIgz5yDYnZ2dnUVZ_tadnZ2d@comcast.com: > I have a guide for MySQL and it doesn't mention the COALESCE command > at all or how to use it. Does it exist in MySQL, or only in MS SQL? > Thanks. mysql> SELECT VERSION(); +----------------------+ | VERSION() | +----------------------+ | 5.0.24a-community-nt | +----------------------+ 1 row in set (0.09 sec) mysql> HELP COALESCE; Name: 'COALESCE' Description: Syntax: COALESCE(value,...) Returns the first non-NULL value in the list, or NULL if there are no non-NULL values. Examples: mysql> SELECT COALESCE(NULL,1); -> 1 mysql> SELECT COALESCE(NULL,NULL,NULL); -> NULL mysql> -- felix |