Mega Code Archive

 
Categories / MSSQL Tutorial / System Tables Views
 

Displays the trigger SQL definition (if the trigger is not encrypted)

4> 5> SELECT o.name, m.definition 6> FROM sys.sql_modules m 7> INNER JOIN sys.objects o ON 8> m.object_id = o.object_id 9> WHERE o.type = 'TR' 10> GO name          definition ------------------------------------------------------------------------------------------------------------------------ -------- --------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------ ------------------------- 1>