MySQL 批量操作单表列名大小写转换

批量操作单表列名大小写转换:

#parking_record 为表名,实际操作修改为自己的表名
SELECT
concat(’alter table ’, ‘parking_record’, ’ change column ’, COLUMN_NAME, ’ ’, LOWER( COLUMN_NAME), ’ ‘, COLUMN_TYPE, ’ comment '’, COLUMN_COMMENT, ‘';’ ) AS ‘修改脚本’
FROM
information_schema.COLUMNS
WHERE
TABLE_NAME = ‘parking_record’