Tuesday, August 31, 2010

SQL to remember

SELECT * FROM syscomments s

LEFT OUTER JOIN sysobjects o ON s.id = o.id

WHERE text like '%Search Term%'


That is how you search through (in my case) stored procedures in a database. Works in SQL 2000. No that's not a typo.