1.查询database中所有表名,SQL语句:
select table_name from information_schema.tables
where table_schema='数据库名';
select table_name from information_schema.tables
where table_schema='test';
2.查询database中有多少张表,SQL语句:
SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = '数据库名' GROUP BY table_schema;
SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = 'test' GROUP BY table_schema;