Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张没有任何键(外键和...)的表。某些表字段具有空值。当我使用命令时:
DELETE FROM `woe300websnt` WHERE (Arg1=NULL AND Rel=NULL AND Arg2=NULL);
查询成功运行,但是当我使用
select * from woe300websnt
我看到没有应用任何更改,并且保留了这些行。我是怎么了?
null不是一个值——它是一个值的缺失。您不能=在其上使用运算符,而需要使用is运算符:
null
=
is
DELETE FROM woe300websnt WHERE Arg1 IS NULL AND Rel IS NULL AND Arg2 IS NULL;