New answers tagged

0

You can query with this one: SELECT TABLE_OWNER, TABLE_NAME, REFERENCED_OWNER AS SEQUENCE_OWNER, REFERENCED_NAME AS SEQUENCE_NAME FROM ALL_DEPENDENCIES d JOIN ALL_TRIGGERS t ON TRIGGER_NAME = d.NAME AND t.OWNER = d.OWNER WHERE REFERENCED_TYPE = 'SEQUENCE'; Note, a sequence might be used by more than one trigger. And a sequence can be used also ...


0

Finally i found the point that i have to use OUTPUT command. Using OUTPUT in an INSTEAD OF trigger This is Fixed SQL Trigger: CREATE TRIGGER [Trigger_MyTable_OnInsert] ON [MyTable] INSTEAD OF INSERT AS BEGIN INSERT INTO MyTable([GroupId], [ItemId], [Data]) OUTPUT INSERTED.[ItemId] as [ItemId] SELECT [GroupId], ISNULL((SELECT MAX(ItemId) ...


Top 50 recent answers are included