Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Two tables that they have foreign keys pointing to each other RE: Two tables that they have foreign keys pointing to each other
Joe Torre
SSChampion
Points: 10248
More actions
February 1, 2018 at 3:16 pm
#1978275
Try doing both in a single transaction:begin tran delete tbl1 where ... delete tbl2 where...commit;
begin tran delete tbl1 where ... delete tbl2 where...commit;