sqlite> SELECT fmn,IMPLANTATIONgrading FROM T93C_ADL WHERE IMPLANTATIONgrading i s not null and fmn like '85495%'; 854954|R 854952| //-----------------------------------------------------------------here is NULL, but I don't know why it shows in the not null result 854951|R 854953|R 854950|R 854959|G 854957| 854955|R 854956|R 854958| sqlite> SELECT fmn,IMPLANTATIONgrading FROM T93C_ADL WHERE IMPLANTATIONgrading i s null and fmn like '85495%'; sqlite> SELECT fmn,IMPLANTATIONgrading FROM T93C_ADL WHERE fmn like '85495%'; 854954|R 854952| 854951|R 854953|R 854950|R 854959|G 854957| 854955|R 854956|R 854958| sqlite>
Message: 6 Date: Wed, 7 Nov 2012 08:44:01 +0000 From: Simon Davies <simon.james.dav...@gmail.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Subject: Re: [sqlite] couldn't use is null function Message-ID: <CANG6AhQU9J5rOo3h-WouE0Gr=nutj2sdnxnoyf31oo+356m...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 On 7 November 2012 08:27, YAN HONG YE <yanhong...@mpsa.com> wrote: > SELECT * FROM ADL WHERE Project_grading is null; > can't select anything. sqlite> create table ADL( id integer primary key, data text, Project_grading integer ); sqlite> insert into ADL( data, Project_grading ) values( '1', 1 ); sqlite> insert into ADL( data, Project_grading ) values( '2', 2 ); sqlite> insert into ADL( data ) values( '3' ); sqlite> insert into ADL( data, Project_grading ) values( '4', 4 ); sqlite> insert into ADL( data ) values( '5' ); sqlite> insert into ADL( data, Project_grading ) values( '6', 6 ); sqlite> sqlite> select * from ADL; 1|1|1 2|2|2 3|3| 4|4|4 5|5| 6|6|6 sqlite> sqlite> select * from ADL where Project_grading is null; 3|3| 5|5| Regards, Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users