大家好,又见面了,我是你们的朋友全栈君。
表名 改为 小写
SELECT CONCAT( ‘ALTER TABLE ‘, table_name, ‘ RENAME ‘, LOWER( table_name ), “;” ) AS statement FROM information_schema.TABLES WHERE table_schema = ‘数据库’ AND table_name LIKE ‘表名%’;
列名 改为 小写
SELECT concat( ‘alter table ‘, TABLE_NAME, ‘ change column ‘, COLUMN_NAME, ‘ ‘, LOWER( COLUMN_NAME ), ‘ ‘, COLUMN_TYPE, ‘;’ ) AS ‘修改脚本’ FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘act’;
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/138372.html原文链接:https://javaforall.cn