mysql 快速生成数据表注释
SELECTt.COLUMN_NAME AS 字段,t.COLUMN_TYPE AS 数据类型,CASE IFNULL(t.COLUMN_DEFAULT,\'Null\')WHEN \'\' THEN \'空字符串\'WHEN \'Null\' THEN \'NULL\'ELSE t.COLUMN_DEFAULT END AS 默认值,CASE t.IS_NULLABLE WHEN \'YES\' THEN \'是\' ELSE \'否\' END AS 是否允许为空,CASE t.COLUMN_KEYWHEN \'PRI\' THEN \'YES\'ELSE \'\' END AS 主键,CASE t.EXTRAWHEN \'auto_increment\' THEN \'YES\'ELSE \'\' END AS 是否自增,t.COLUMN_COMMENT AS 参数注释FROM information_schema.COLUMNS tWHERE t.TABLE_NAME=\'表名\';