在MYSQL中使用join删除行

时间:2018-01-16 21:22:11

标签: mysql sql join crud sql-delete

我编写了以下查询来删除行但获取unexpected syntax error

delete from table1 T1
INNER JOIN table2 T2 ON
T1.column1 = T1.column2
where T2.date >  '2001-01-16'

请告诉我正确的语法

1 个答案:

答案 0 :(得分:1)

尝试 delete T1 from table1 T1 INNER JOIN table2 T2 ON T1.column1 = T1.column2 where T2.date > '2001-01-16'