Is there a way to get the table name of the table that fired a trigger from WITHIN that trigger? In other words, say I have a table 'Employees' and a trigger on it defined below:
ALTER TRIGGER xyz ON dbo.[MySchedTable]
FOR INSERT, UPDATE, DELETE
NOT FOR REPLICATION
AS
DECLARE @NumInsertedRecords int
...
...
I want to be able to know within the trigger what my table name is, in this case 'MySchedTable'. Is there any way to do this?
Thanks!
ALTER TRIGGER xyz ON dbo.[MySchedTable]
FOR INSERT, UPDATE, DELETE
NOT FOR REPLICATION
AS
DECLARE @NumInsertedRecords int
...
...
I want to be able to know within the trigger what my table name is, in this case 'MySchedTable'. Is there any way to do this?
Thanks!