Reputation: 4562
I am working on my android project with SQLite database. I need to get all the information of the perons who doesn't have a phone. I tried with following three ways but didn't provide the required data. I have assign phone varchar(64), when create table.
select * from person where phone='null'
select * from person where phone=null
select * from person where phone=''
can anyone tell why is this happening and how can I get the information. Thanks
Upvotes: 0
Views: 372
Reputation: 20859
To query a null value use this sql statement:
select * from person where phone IS null
Upvotes: 4