#查询SQLselectnames.TABLE_NAME as 表英名,names.TABLE_COMMENT as 表中文,column_name as 字段名称,column_type as 数据类型,column_comment as 字段备注FROMinformation_schema.COLUMNS as columnsleft join (select TABLE_NAME,table_comment from information_schema.TABLES) as names on columns.table_name = names.TABLE_NAMEWHERE columns.table_schema = 'xxx' #要查询的数据库名称and columns.TABLE_NAME = 'xxx' #要查询的表名group by columns.COLUMN_NAME,columns.TABLE_NAME order by columns.TABLE_NAME;
我这里使用的datagrip工具,在查询出的数据右上角有个导出数据,可选择导除的格式