长情奇迹

文章
3
资源
0
加入时间
3年0月21天

达梦数据库修改字段类型-从TEXT类型改为int类型

达梦数据库不支持直接从text类型改为int的数据类型;所以得新建字段,从text复制到varchar类型,再将字段改为 int类型sql过程,假设现在有表a,字段为a_col,字段类型为 text要将 a_col改为 int类型-- 新建字段alter table a modify a_col_bak varchar(20);-- 字段原值赋值update a set a_col_bak = a_col; -- 修改新字段类型为intalter table a modify a_c