
Iterating stored procedures in SQL
November 30, 2011You can iterate the procedures and functions in your database with a query like this:
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
Or, if you only want to see the stored procedures and functions that you have created yourself:
SELECT specific_name, routine_type, created, last_altered FROM INFORMATION_SCHEMA.ROUTINES where substring(specific_name, 1,3) != 'sp_' and substring(specific_name, 1,4) != 'sys_' and substring(specific_name, 1,7) != 'aspnet_'
Advertisement