我有一个名为Persons的桌子
我的要求是,我需要检查Persons表中是否存在PersonID = 1的任何记录,如果存在 删除它
我试过
DELETE FROM Persons
WHERE PersonID = 1
AND EXISTS(SELECT PersonID FROM Persons WHERE PersonID = 1 LIMIT 1)
我收到以下错误
答案 0 :(得分:1)
不需要这样的麻烦,只需做" DELETE FROM Persons WHERE PersonID = 1"