sqlite是否在DELETE子句中支持JOIN?

时间:2019-02-24 13:24:53

标签: sqlite

通常,MySQL支持JOIN子句进行删除查询。 范例- 删除w 从WorkRecord2 w 内部加入员工e   ON EmployeeRun =员工编号 WHERE Company ='1'AND Date ='2013-05-06'

sqlite支持吗?

1 个答案:

答案 0 :(得分:0)

SQLite不支持MySQL的联接结构。但是,您仍然可以使用相关子查询来重新定义您的查询,例如

DELETE
FROM WorkRecord2 w
WHERE EXISTS (SELECT 1 FROM Employee e
              WHERE w.EmployeeRun = e.EmployeeNo AND e.Company = '1') AND
    Date = '2013-05-06';