Saturday, January 03, 2009

MySQL ISNULL() Function

If you are familiar with Microsoft SQL you may have used the ISNULL() function; the equivalent function in MySQL is IFNULL().

In Microsoft SQL, the syntax is as follows:

SELECT ISNULL(NULL, 'Some Value')

In MySQL, the syntax is as follows:

SELECT IFNULL(NULL, 'Some Value')

No comments: