SQL DELETE with INNER JOIN

前端 未结 3 475
慢半拍i
慢半拍i 2020-12-02 17:39

There are 2 tables, spawnlist and npc, and I need to delete data from spawnlsit. npc_templateid = n.idTemplate is the onl

3条回答
  •  青春惊慌失措
    2020-12-02 18:31

    Add .* to s in your first line.

    Try:

    DELETE s.* FROM spawnlist s
    INNER JOIN npc n ON s.npc_templateid = n.idTemplate
    WHERE (n.type = "monster");
    

提交回复
热议问题