这可能是一个简单的问题,但我对mysql查询不太满意。
我尝试此查询从表中删除某些项但收到错误。 这是查询:
DELETE FROM sys_forms_in_groups WHERE FormID IN (6,7,23,41) AND WHERE GroupID = 2
这是我得到的错误。
Error Code: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where GroupID = 2' at line 1
这是我要从中删除记录的表。
答案 0 :(得分:5)
你的条款中有一个多余的WHERE
:
DELETE FROM sys_forms_in_groups WHERE FormID IN (6,7,23,41) AND WHERE GroupID = 2
^ here
删除,这应该没问题。