1 drop table if exists t1;
2 select {fn length("hello")}, { date "1997-10-20" };
3 {fn length("hello")} 1997-10-20
5 create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
6 insert into t1 SET A=NULL,B=1;
7 insert into t1 SET a=null,b=2;
8 select * from t1 where a is null and b=2;
11 select * from t1 where a is null;
13 explain select * from t1 where b is null;
14 id select_type table type possible_keys key key_len ref rows Extra
15 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
17 CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
18 INSERT INTO t1 VALUES (NULL);
19 SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
22 SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
24 SELECT sql_no_cache a, last_insert_id() FROM t1;