SELECT a.`TABLE_SCHEMA` AS DB_NAME , a.`TABLE_NAME` , a.`TABLE_ROWS` ,a.`ENGINE` -- , a.* FROM information_schema.`TABLES` a LEFT JOIN information_schema.`TABLE_CONSTRAINTS` b ON a.`TABLE_NAME` = b.`TABLE_NAME` AND a.`TABLE_SCHEMA` = b.`TABLE_SCHEMA` WHERE b.`TABLE_SCHEMA` IS NULL AND a.`TABLE_TYPE` = 'BASE TABLE' AND a.`TABLE_SCHEMA` NOT IN ('information_schema','test','mysql','performance_schema') ORDER BY DB_NAME ,a.`TABLE_ROWS` DESC ;
您可能感兴趣的文章:
深入探寻mysql自增列导致主键重复问题的原因mysql把主键定义为自动增长标识符类型MySQL生产库Insert了2次同样的记录但是主键ID是不一样的问题的分析过程深入Mysql,SqlServer,Oracle主键自动增长的设置详解MySQL查询优化:用子查询代替非主键连接查询实例介绍Oracle与Mysql主键、索引及分页的区别小结MySQL 主键与索引的联系与区别分析sqlserver数据库主键的生成方式小结(sqlserver,mysql)mysql下创建字段并设置主键的php代码MySQL 创建主键,外键和复合主键的语句MySQL里Create Index 能否创建主键 Primary KeyMysql主键相关的sql语句集锦