The correct answer is incorrect, REMOVE using CTE (same with INSERT and UPDATE commands).
( You cannot use the inner join, but you can use the CTE with DELETE ).
In Oracle 9i +, the following applies:
DELETE FROM table_b WHERE (datecol, mycol) IN ( WITH my_cte AS ( SELECT DISTINCT var1, var2 FROM table_a ) SELECT var1, var2 from my_cte );
This particular case does not benefit from the CTE at all, but other, more complex statements might.
source share