Friday, October 16, 2009

Search SQL Server Trigger Code

If you need to search through trigger code for table or column  names use this code:

SELECT OBJECT_NAME(id)
FROM syscomments
WHERE OBJECTPROPERTY(id, 'IsTrigger') = 1
and lower(text) like '%wordtosearchfor%'

No comments:

Post a Comment