MySql】查询数据库中所有表及列的信息
作者:互联网
SELECT table_name ,table_rows
FROM information_schema.tables
WHERE table_schema='数据库名称'
ORDER BY table_rows DESC;
----------------------------------------------------
SELECT
TABLE_NAME, -- 表名
COLUMN_NAME, -- 字段名
DATA_TYPE, -- 字段类型
COLUMN_COMMENT -- 字段注释
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = '数据库名称'
use information_schema; select table_name,table_rows from tables where TABLE_SCHEMA = 'testdb' order by table_rows desc;
标签:rows,--,查询数据库,表及,MySql,table,SCHEMA,TABLE,schema 来源: https://www.cnblogs.com/Rukh/p/16698953.html