开发者

MySQL set NULL Query not always works

UPDATE `table` 
SET `sent`='1', `taken`='开发者_开发问答1', `free`=NULL
WHERE `owner`='1' AND ISNULL(`sent`) AND !ISNULL(`free`);

Works, but set free to NULL not always works. Any ideas? Thx


Check your triggers.


UPDATE `table` 
SET `sent`='1', `taken`='1', `free`=NULL
WHERE `owner`='1' AND `sent` is null AND `free` is not null;


Execute the following query to check if it returns all the records you request:

SELECT *
FROM `table`
WHERE `owner`='1' AND ISNULL(`sent`) AND !ISNULL(`free`);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜