select - SQL - return deleted rows -
i combine select returns rows , delete deletes subset of rows selected?
is possible?
if have select statement returns candidates, change select delete output deleted.*.
select * tbl1 inner join tbl2 on tlb1.col = tbl2.col inner join tlb3 on tbl2.anothercol = tbl3.somecol blah blah blah
can become:
delete tbl1 output deleted.* tbl1 inner join tbl2 on tlb1.col = tbl2.col inner join tlb3 on tbl2.anothercol = tbl3.somecol blah blah blah
Comments
Post a Comment