将查询 "delete join" 从 postgres 翻译成 oracle

traslate query "delete join" from postgres to oracle

大家好,感谢 attention.I 必须 "traslate" 从 postgres 到 oracle 这个 "delete join query"

DELETE FROM AAA USING BBB WHERE (AAA.date = BBB.date)
 AND (AAA.idtipo = BBB.idtipo)
 AND (AAA.tariffario = BBB.tariffario)
 AND (BBB.IDOrigine = 20 )

谢谢!! 吉安

使用exists:

DELETE FROM AAA 
   WHERE EXISTS (SELECT 1
                 FROM BBB
                 WHERE (AAA.date = BBB.date) AND
                       (AAA.idtipo = BBB.idtipo) AND
                       (AAA.tariffario = BBB.tariffario) AND
                       (BBB.IDOrigine = 20 )
                );

这是标准的 SQL,应该可以在 Postgres 和 Oracle(以及其他数据库)中使用。