Kurz und knackig kann man dies folgendermaßen feststellen:
CREATE TABLE t1 (c1 int) GO CREATE TRIGGER myTrigger ON t1 AFTER INSERT AS SELECT OBJECT_NAME(@@PROCID) AS TriggerName , [name] AS TableName , GETDATE() AS ExecutedOn FROM sysobjects WHERE id= (SELECT parent_obj FROM sysobjects WHERE ID=@@PROCID) GO INSERT INTO t1(c1) VALUES(1) GO DROP TABLE t1 TriggerName TableName ExecutedOn --------------------- ------------ ------------------------ myTrigger t1 2005-07-25 22:00:07.037 (1 row(s) affected)







