# 查询所有表名
select table_name tableName,
engine,
table_comment tableComment,
table_collation tableCollation,
create_time createTime
from information_schema.tables
where table_schema = (select database())
order by create_time desc;
#查询所有表结构
select column_name columnName,
data_type dataType,
column_comment columnComment,TABLE_NAME
from information_schema.columns
where
table_schema = (select database())
order by TABLE_NAME;