In my db I have a couple of tables that look similar to the following:
Table1
fooID -> Primary Key Identity
barID -> Foreign Key of Table2
Table2
barID -> Primary Key Identity
If I were to run a DELETE statement on Table1 as in:
Is there a sql function or someway to retrieve which "fooID" 's were deleted from Table1?
It's like I need something that does the opposite of the @@IDENTITY function. Instead of retrieving a newly added identity on an INSERT, I need to get the identities that have been removed from the table.
Table1
fooID -> Primary Key Identity
barID -> Foreign Key of Table2
Table2
barID -> Primary Key Identity
If I were to run a DELETE statement on Table1 as in:
Code:
DELETE FROM Table1 WHERE barID = 33
Is there a sql function or someway to retrieve which "fooID" 's were deleted from Table1?
It's like I need something that does the opposite of the @@IDENTITY function. Instead of retrieving a newly added identity on an INSERT, I need to get the identities that have been removed from the table.