WHERE - IS NULL not working in SQLite?

前端 未结 6 568
野性不改
野性不改 2020-12-09 08:14

Here\'s a strange one:

I can filter on NOT NULLS from SQLite, but not NULLS:

This works:

SELECT *          


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 08:25

    The problem could stem from how SQLite handles empty columns. For instance just because a column is empty does not mean it is NULL. Have you tested against ""?

    SELECT * FROM project WHERE parent_id = ""
    

    That query might return results.

提交回复
热议问题