SQLite查詢空值
1、當(dāng)插入數(shù)據(jù)位空時(shí)(如:Second= “”),數(shù)據(jù)中顯示內(nèi)容為(null)。如圖所示。
查詢顯示為空的列表:
1 select * from Test where Second is null
顯示結(jié)果:
查詢顯示不為空的列表:
1 select * from Test where Second not null
2、當(dāng)插入數(shù)據(jù)的字段不存在時(shí),數(shù)據(jù)庫(kù)中顯示為空。如圖所示。
查詢顯示為空的列表:
1 select * from Test where Second is ''
顯示結(jié)果
查詢顯示不為空的列表:
1 select * from Test where Second <> ''