sql: accept IS NOT DISTINCT FROM operator (fix #54)
[sqlgg.git] / test / null.sql
blobe65cdeac85d291bc179ec0e4970d54685b0cc99e
1 CREATE TABLE IF NOT EXISTS `test` (
2   `id` INTEGER UNSIGNED PRIMARY KEY AUTO_INCREMENT,
3   `nullable` TIMESTAMP NULL
4 );
6 -- issue #45
7 -- @create
8 INSERT INTO `test` SET
9   `nullable` = CASE @nullable WHEN 0 THEN NULL ELSE @nullable END
12 -- @create2
13 INSERT INTO `test` SET `nullable` = IFNULL(@nullable, 0);
15 -- @list
16 SELECT `id`, NULLIF(`nullable`, 0) `nullable` FROM `test`;