Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Wednesday, November 9, 2011

Search for text in Stored Procedure

I’m tried of searching for this all the time. So here is where I’m storing it. ^_^

SELECT ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_DEFINITION
    FROM INFORMATION_SCHEMA.ROUTINES
    WHERE ROUTINE_DEFINITION LIKE '%text%'
    AND ROUTINE_TYPE='PROCEDURE'
    ORDER BY ROUTINE_SCHEMA, ROUTINE_NAME

Just replace text with whatever you are looking for. But this does not search for functions or such.