use information_schema;
SELECT DISTINCT
t.table_name,
t.engine '表引擎',
t.table_rows
FROM
TABLES t
WHERE
1 = 1
AND t.table_schema = 'mysql_database_name'-- 自己数据库的名字
AND t. ENGINE IS NOT NULL
ORDER BY
t.table_name,t.table_rows ;
SELECT
t.TABLE_SCHEMA '数据库',
t.TABLE_COMMENT '表注释',
t.TABLE_name '表名',
t.TABLE_ROWS '行数',
t.CREATE_TIME '创建时间',
t.update_TIME '最后修改时间',
c.COLUMN_NAME '列名',
c.column_comment '字段注释'
c.COLUMN_KEY '主键',
c.DATA_TYPE '类型',
c.COLUMN_TYPE '长类型',
c.CHARACTER_MAXIMUM_LENGTH '长度'
FROM
information_schema.TABLES t
INNER JOIN information_schema.COLUMNS c ON t.TABLE_SCHEMA = c.TABLE_SCHEMA
where t.table_schema = 'mysql_database_name'
and t.table_name = 'mysql_table_name'
and c.TABLE_NAME = 'mysql_table_name'
LIMIT 100