On 25/05/2009 10:15 PM, chandan wrote: > Hi, > I have used sqlite3_bind_null() API to bind an integer column with > NULL. When I read the value of that integer column I get the value as 0 > (zero). Is there any way I can check if the column is set to NULL?
You do realise that calling it "that integer column" is more hopeful than meaningful, don't you? How are you reading "the value of that integer column"? Here are some ways you can display it and test it using SQL: sqlite> create table t (i integer); sqlite> insert into t values(1); sqlite> insert into t values(0); sqlite> insert into t values(-1); sqlite> insert into t values(null); sqlite> insert into t values(123.456); sqlite> insert into t values('abcdef'); sqlite> insert into t values(x'f000baaa'); sqlite> select rowid, i, quote(i), typeof(i) from t; 1|1|1|integer 2|0|0|integer 3|-1|-1|integer 4||NULL|null 5|123.456|123.456|real 6|abcdef|'abcdef'|text 7||X'F000BAAA'|blob sqlite> select rowid, i, quote(i), typeof(i) from t where i is null; 4||NULL|null Cheers, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users