Mysql: Find all stored procedures that reference a specific table

Viewed 9828

I want to check all SPs/function that reference a particular table in mysql. I found a query which I belive is to check the same in sql server:

SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%tablename%'

But in mysql it says 'Table sys.procedures doesn't exist'

2 Answers
select * from information_schema.ROUTINES where ROUTINE_DEFINITION like '%tableName%'; 
Related