'NOT LIKE' in an SQL query

后端 未结 4 427
青春惊慌失措
青春惊慌失措 2021-02-02 08:42

Why does this simple query return \'ORA-00936: missing expression\' (the database is Oracle as you can tell):

SELECT * FROM transactions WHERE id NOT LIKE \'1%\'         


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-02 09:29

    After "AND" and after "OR" the QUERY has forgotten what it is all about.

    I would also not know that it is about in any SQL / programming language.

    if(SOMETHING equals "X" or SOMETHING equals "Y")

    COLUMN NOT LIKE "A%" AND COLUMN NOT LIKE "B%"

提交回复
热议问题