How do I add multiple "NOT LIKE '%?%' in the WHERE clause of sqlite3?

前端 未结 7 2157
无人及你
无人及你 2020-12-23 20:06

I have a sqlite3 query like:

SELECT word FROM table WHERE word NOT LIKE \'%a%\';

This would select all of the words where \'a\' does not oc

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 20:11

    If you have any problems with the "not like" query, Consider that you may have a null in the database. In this case, Use:

    IFNULL(word, '') NOT LIKE '%something%'
    

提交回复
热议问题