MySql 修改字段注释

select CONCAT('alter table ',TABLE_NAME,' modify column ',' `',column_name,'` ',column_type,' ',IS_NULLABLE,' ',' comment ',"'",ccname,"'",' ;') from
(
SELECT
c.TABLE_NAME,c.column_name, c.column_type, case c.IS_NULLABLE when 'YES' then 'NULL' else 'NOT NULL' end IS_NULLABLE,c.COLUMN_DEFAULT,i.ccname,c.COLUMN_KEY,length(c.COLUMN_KEY)
FROM
intelligent_ai_test.cinfo i
LEFT JOIN information_schema.`COLUMNS` c ON c.TABLE_SCHEMA = 'big_data_spmh'
AND c.TABLE_NAME = i.tname
AND i.cname = c.COLUMN_NAME
) t;

上一篇:空的区县匹配最邻近的点


下一篇:ENVI无法打开landsat level2级产品--matlab