SQL左连接无法删除行?

时间:2016-11-30 15:06:33

标签: sql windows oracle

所以我尝试使用sql中的以下代码删除左连接表中的某些行:

DELETE gw_svd_prefix_assignment
FROM gw_svd_prefix_assignment svdp
left join assyst_view av
on upper(svdp.user_name) = upper(av.usr_sc)
where upper(av.usr_sc) IS NULL
commit;

但是我收到了这个错误:

Error starting at line : 1 in command -
DELETE gw_svd_prefix_assignment
FROM gw_svd_prefix_assignment svdp
left join assyst_view av
on upper(svdp.user_name) = upper(av.usr_sc)
where upper(av.usr_sc) IS NULL
commit
Error at Command Line : 2 Column : 1
Error report -
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 -  "SQL command not properly ended"
*Cause:    
*Action:

1 个答案:

答案 0 :(得分:2)

Oracle不支持该语法。 total.combine(trans).combine(trans2).combine(trans3); UPDATE仅适用于一个表格。 。 。 DELETE子句不能包含多个表。

相反,将逻辑放在FROM子句中:

WHERE