Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
allan8964
Posting Yak Master
249 Posts |
Posted - 2012-03-07 : 16:57:18
|
Hi there,If I know there is a DML trigger by using select * from sys.triggersand I know the trigger name how can I see the script of that trigger? |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-03-07 : 17:00:37
|
select name, OBJECT_DEFINITION(object_id) from sys.triggers |
|
|
allan8964
Posting Yak Master
249 Posts |
Posted - 2012-03-07 : 17:34:15
|
OK, but the format is horrible. I copy that out to a notepad, still no lines feedback ... any better way?Thanks for help. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-03-07 : 17:40:06
|
Use Results to Text rather than Grid.You can also find the trigger in the Object Explorer in Management Studio and script it from there. |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|