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
|
2002-08-30 20:32:59 +02:00
|
|
|
drop table if exists t1;
|
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;
|
2000-12-28 02:56:38 +01:00
|
|
|
Comment
|
|
|
|
Impossible WHERE noticed after reading const tables
|
2001-09-28 07:05:54 +02:00
|
|
|
drop table t1;
|