我正在使用 Sybase,它抱怨以下有语法错误:
DELETE
*
FROM
table1 INNER JOIN table2 ON table1.some_col = table2.some_col
具体错误是:Incorrect syntax near the keyword 'inner join'.
我在网上查了一下,这就是人们的做法,但我的拒绝接受。
有人可以告诉我有什么问题吗?
假设您打算根据与 table2 的连接从 table1 中删除以下内容
DELETE table1
FROM
table1 INNER JOIN table2 ON table1.some_col = table2.some_col
根据Sybase's Manual,它应该是这样的:
DELETE
FROM table1
FROM table1, table2
WHERE
table1.some_col = table2.some_col