SQLite select where empty?

后端 未结 4 501
春和景丽
春和景丽 2021-01-29 23:33

In SQLite, how can I select records where some_column is empty?
Empty counts as both NULL and \"\".

4条回答
  •  时光取名叫无心
    2021-01-30 00:03

    There are several ways, like:

    where some_column is null or some_column = ''
    

    or

    where ifnull(some_column, '') = ''
    

    or

    where coalesce(some_column, '') = ''
    

    of

    where ifnull(length(some_column), 0) = 0
    

提交回复
热议问题