【发布时间】:2018-07-30 08:00:28
【问题描述】:
无法验证 MySQL 中是否存在表。
尝试了下面的查询,但没有输出。
if !(select * from information_schema.tables where table_name='sy_code')
【问题讨论】:
-
没有输出意味着不存在兄弟
无法验证 MySQL 中是否存在表。
尝试了下面的查询,但没有输出。
if !(select * from information_schema.tables where table_name='sy_code')
【问题讨论】:
要查看表的架构,请使用查询
DESCRIBE table_name;
要查看我们数据库中的所有现有表,请使用查询
SELECT table_name FROM information_schema.tables WHERE table_schema = 'your_db'
【讨论】: