SQL Delete Rows Based on Another Table

前端 未结 6 1387
别那么骄傲
别那么骄傲 2020-12-13 18:44

This is probably very easy, but it\'s Monday morning. I have two tables:

Table1:

Field        | Type             | Null | Key | Default | Extra
id           


        
6条回答
  •  执笔经年
    2020-12-13 19:11

    I think this way is faster:

    DELETE FROM t1 USING table1 t1 INNER JOIN table2 t2 ON ( t1.group = t2.group );
    

提交回复
热议问题