根据表名查询数据库表信息
select concat(TABLE_SCHEMA,".",TABLE_NAME) TABLE_NAME, TABLE_COMMENT, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH, CREATE_TIME, UPDATE_TIME
from information_schema.`TABLES` where 1=1
-- and TABLE_SCHEMA = ''
and TABLE_NAME like '%order%'
and TABLE_COMMENT like '%%'
order by TABLE_ROWS desc
;
根据列名查询数据库字段信息
select concat(TABLE_SCHEMA,".",TABLE_NAME) COLUMN_NAME, COLUMN_TYPE, COLUMN_COMMENT, COLUMN_DEFAULT
from information_schema.`COLUMNS` where 1=1
-- and TABLE_SCHEMA = ''
and COLUMN_NAME like '%order%'
and COLUMN_COMMENT like '%%'
;