语句如下:
SELECT count(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA='dbname';
其中dbname是要查看的数据库的名字。
查看表结构:
description tbname;
也可使用简写:
desc tbname;
语句如下:
SELECT count(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA='dbname';
查看表结构:
description tbname;
desc tbname;