Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从我的客户那里得到了 MySQL 数据库,它有很多存储过程。问题是某些存储过程包含错误的表名(不存在的表名)。那么有没有一种机制可以在存储过程中找到那些错误的表名?
使用以下命令检查表是否存在。
SHOW TABLES LIKE 'yourtable';
如果表存在则返回表名,如果不存在则返回 0 行。