先上代码
SELECT t1.TABLE_SCHEMA, t1.TABLE_NAME, t2.TABLE_COMMENT, t1.COLUMN_NAME, t1.COLUMN_COMMENT, t1.COLUMN_TYPE FROM information_schema.COLUMNS t1 inner join information_schema.tables t2 on t1.TABLE_SCHEMA = t2.TABLE_SCHEMA and t1.TABLE_NAME = t2.TABLE_NAME WHERE t1.TABLE_NAME NOT LIKE 'vw%' and t1.TABLE_SCHEMA not in ( 'information_schema' ) ;
查询结果满足以下表格统计: