SELECT * FROM `information_schema`.`TABLES` WHERE `information_schema`.`TABLES`.`TABLE_SCHEMA` = 'XXX' AND `information_schema`.`TABLES`.`TABLE_NAME` = 'XXX'\G
2.查看正在运行的进程
SELECT * FROM information_schema.PROCESSLIST p where (p.INFO is not NULL or p.COMMAND='Query') AND USER='hadoop';
show processlist;
3.统计MySQL中指定数据库中有多少张表
SELECT count(*) TABLES, table_schema FROM information_schema.TABLES
where table_schema = '数据库名称xxx' GROUP BY table_schema;
4.统计MySQL中指定数据库中表记录数
use information_schema;
select table_name,table_rows from tables where TABLE_SCHEMA = '数据库名称xxx' order by table_rows desc;
where table_schema = '你的数据库名'
文章目录1.查看表的创建时间和更新时间1.查看表的创建时间和更新时间SELECT * FROM information_schema.TABLES WHERE information_schema.TABLES.TABLE_SCHEMA = ‘XXX’ AND information_schema.TABLES.TABLE_NAME = ‘XXX’\G