Skip to content

Instantly share code, notes, and snippets.

@richardbasile
Created February 16, 2018 14:48
Show Gist options
  • Save richardbasile/93604c8a209c5150c9c093fe2872d519 to your computer and use it in GitHub Desktop.
Save richardbasile/93604c8a209c5150c9c093fe2872d519 to your computer and use it in GitHub Desktop.
SQL Server - Stored Procedures
SELECT a.xtype, a.name, b.colid, b.text
FROM sysobjects a
JOIN syscomments b on b.id = a.id
JOIN ( SELECT distinct id FROM syscomments
WHERE text LIKE '%<snippet>%'
) c on c.id = b.id
ORDER BY 2, 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment