Share on Facebook

Monday, May 7, 2007

Link Triggers & Tables

Triggers and thier corresponding Tables

-- Sybase
select * from systrigger

-- SQL Server
select * from sys.triggers

-- Triggers and Tables
If you want to know the triggers for each table or trigger for a
corresponding table use the following:

-- Sybase
Select stab.table_name, strig.trigger_name from systable stab, systrigger strig
where stab.table_id = strig.table_id

-- SQL Server
Select, from sys.tables stab, sys.triggers strig
where stab.object_id = strig.parent_id

No comments:

Related Posts Plugin for WordPress, Blogger...