标签:cat schema strong rom 方法 table for column sel
方法: 直接从系统视图构造修改的sql
select
concat(‘alter table ‘
,table_name
,‘ CHANGE ‘
,COLUMN_NAME, ‘ ‘
,COLUMN_NAME, ‘ ‘
,DATA_TYPE
,‘(‘
,CHARACTER_MAXIMUM_LENGTH
,‘) CHARACTER SET utf8 COLLATE utf8_general_ci comment "‘
,COLUMN_COMMENT
,‘";‘
)
from information_schema.`COLUMNS` where TABLE_NAME=‘YOUR_TABLE‘
and CHARACTER_SET_NAME = ‘latin1‘
标签:cat schema strong rom 方法 table for column sel
原文地址:https://www.cnblogs.com/shenfeng/p/generate_mysql_alter_change_column.html