Delete from patient WHERE patientId='011' AND '022'
上面的sql语句可以从一个表中删除两个记录吗?
答案 0 :(得分:1)
是的,但是您需要使用OR
而不是AND
:
Delete from patient WHERE patientId='011' OR patientId = '022'
-- alternatively IN
Delete from patient WHERE patientId IN ('011', '022')
答案 1 :(得分:1)
您可以在此处使用:
Delete from patient WHERE patientId In ('011', '022')