delete from missions m where m.mtype=1 and m.cid = (select cid from character_data c where c.guild_id=1);这个sql 如何修改

解决方案 »

  1.   

    delete from missions m where m.mtype=1 and m.cid in (select cid from character_data c where c.guild_id=1);
      

  2.   

    版主这个好像也不对错误:
    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 'm where m.mtype=1 and m.cid in (select cid from character_data c where c.guild_i' at line 1
      

  3.   

    delete from missions where mtype=1 and cid in (select cid from character_data c where c.guild_id=1);