How to delete from multiple tables in MySQL?

后端 未结 7 830
温柔的废话
温柔的废话 2020-11-22 07:57

I am trying to delete from a few tables at once. I\'ve done a bit of research, and came up with this

DELETE FROM `pets` p,
            `pets_activities` pa
          


        
7条回答
  •  礼貌的吻别
    2020-11-22 08:46

    The syntax looks right to me ... try to change it to use INNER JOIN ...

    Have a look at this.

提交回复
热议问题