SQL WHERE condition is not equal to?

前端 未结 10 1838
一生所求
一生所求 2020-12-07 21:48

Is it possible to negate a where clause?

e.g.

DELETE * FROM table WHERE id != 2;
10条回答
  •  囚心锁ツ
    2020-12-07 22:30

    Yes. If memory serves me, that should work. Our you could use:

    DELETE FROM table WHERE id <> 2
    

提交回复
热议问题