January 26, 2022 at 2:20 pm
If I understand what you're asking for, I think the OUTPUT clause is what you're looking for. That will allow you to know exactly which records were deleted from the first table, and use that to delete in the second table.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 26, 2022 at 2:21 pm
I gave you an example of how to do exactly this in your previous post
You just need to change the table names
January 26, 2022 at 2:33 pm
Hi,
It was my mistake here. I need to delete all records associated to Setid in ExamLog table only, not from ExamSet table. ExamSet is only for fetching old Setid records based on CreatedDate.
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply