I'm trying to set an SQL trigger so that when I delete a record from one table it deletes the records in another table with the same ID as the record just deleted.
I thought this would work but it doesn't:
DELETE FROM Table2 WHERE ID=@@IDENTITY
Can anyone help? Thanks!
I thought this would work but it doesn't:
DELETE FROM Table2 WHERE ID=@@IDENTITY
Can anyone help? Thanks!