Bluehost.com Web Hosting $6.95

COALESCE

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-29-2007
Michael Dunn
 
Posts: n/a
Default COALESCE

Dear MySQLers,

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.

Michael


Reply With Quote
  #2 (permalink)  
Old 01-29-2007
Felix Geerinckx
 
Posts: n/a
Default Re: COALESCE

"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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:06 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0