mysql生成数据字典

建立数据库时一定要写好表和字段的备注

#表名
select table_name, table_comment from information_schema.`tables` where table_schema='dbname' and table_name like 'tables';
#列名
select table_name, column_name, data_type, column_comment from information_schema.columns where table_schema='dbname' and table_name like 'tables';
此条目发表在mysql分类目录。将固定链接加入收藏夹。