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'
select * from information_schema.ROUTINES where ROUTINE_DEFINITION like '%tableName%';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With