Created 07-21-2016 02:42 PM
I need to delete records on a phoenix table based on the join with another phoenix table. Is it possible?
If so can anyone provide the syntax. i dont see a direct way of doing this
Created 07-21-2016 05:43 PM
Some join queries can be rewritten like this:-
delete from source1 where (pk1,pk2) in (select pk1,pk2 from source2);
Created 07-21-2016 05:43 PM
Some join queries can be rewritten like this:-
delete from source1 where (pk1,pk2) in (select pk1,pk2 from source2);
Created 07-22-2016 04:57 AM
Thanks Ankit, it works. but is it the effective way if we have large number of rows. AS we are using an IN condition in the query.