Created
May 13, 2013 10:15
-
-
Save HoffmannP/5567358 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
IF(a <=> NULL, 1, a), | |
IF( a IS NULL, 1, a ), | |
IF( a IS NOT NULL, a, 1 ), | |
IF( ISNULL(a), 1, a ), | |
IF( !ISNULL(a), a, 1 ), | |
IF( !!ISNULL(a), 1, a ), | |
IFNULL( a, 1 ) | |
FROM | |
(SELECT 1 as a) as tmp | |
GROUP BY | |
a WITH ROLLUP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment