delete from test3 from test2 a left join test3 b on a.sno = b.sno where a.sno =2 and b.sno = 2
I don't see how the left join makes any sense there. If there is no test3 record matching the test2 record, you have nothing to delete anyway. So may as well use inner join and same approach as I gave before.
delete from (select * from test2 a, test3 b where b.sno = a.sno and a.sno = 3 and b.sno = 3)
Yes, that works provided exactly one of the tables is key-preserved in the query, in which case it is the key-preserved table that gets deleted from. A table is key-preserved if Oracle knows that one row in the query always maps one-to-one with one row in the table. If there is a foreign key from test2 referencing test3, then test2 is key-preserved and test3 is not (because the same test3 row may be referenced by many test2 rows). Given that fact, there is no way to make Oracle delete from test3 in that query.
i need help, please help me Oracle syntaq
i want to delete record from t_admin_user_code where t_admin_user inner join a.user = b.user which the condition in the t_admin_user where area_id=5 AND aut='4'
so i want to dalete from t_admin_user_code where at t_admin_user was area_id=5 AND aut='4'