Check if the stored procedures contain correct table names

191 Views Asked by At

I got MySQL database from my client and it has lot of stored procedures. The problem is that some of the stored procedures contain wrong table names (table names that do not exist). So is there a mechanism I can find those wrong table names in stored procedures?

1

There are 1 best solutions below

4
On

Check whether table exist or not using following command.

SHOW TABLES LIKE 'yourtable';

If table exist then it will return table name,if not exist then it will return 0 row.