2003-01-06 00:48:59 +01:00
|
|
|
drop table if exists t1;
|
2001-09-28 07:05:54 +02:00
|
|
|
select {fn length("hello")}, { date "1997-10-20" };
|
2000-12-28 02:56:38 +01:00
|
|
|
{fn length("hello")} 1997-10-20
|
|
|
|
5 1997-10-20
|
2001-09-28 07:05:54 +02:00
|
|
|
create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
|
|
|
|
insert into t1 SET A=NULL,B=1;
|
|
|
|
insert into t1 SET a=null,b=2;
|
|
|
|
select * from t1 where a is null and b=2;
|
2000-12-28 02:56:38 +01:00
|
|
|
a b
|
|
|
|
2 2
|
2001-09-28 07:05:54 +02:00
|
|
|
select * from t1 where a is null;
|
2000-12-28 02:56:38 +01:00
|
|
|
a b
|
2001-09-28 07:05:54 +02:00
|
|
|
explain select * from t1 where b is null;
|
2002-09-26 22:08:22 +02:00
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
2002-12-14 16:43:01 +01:00
|
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
2001-09-28 07:05:54 +02:00
|
|
|
drop table t1;
|