表中如果有数据需要用到下方方式去修改字段类型,无数据可直接修改
/*修改原字段名name为name_tmp*/
alter table qdfx_ycsjd rename column yccxds to yccxds_tem;
/*增加一个和原字段名同名的字段name*/
alter table qdfx_ycsjd add yccxds number;
/*将原字段name_tmp数据更新到增加的字段name*/
update qdfx_ycsjd set yccxds_tem=trim(yccxds);
/*更新完,删除原字段name_tmp*/
alter table qdfx_ycsjd drop column yccxds_tem;