其他分享
首页 > 其他分享> > 加的字段类型错误需先清空

加的字段类型错误需先清空

作者:互联网

除了小数和日期,其他都设为字符型比较妥当

如果加字段的类型弄错,需清空字段的值,再删除,再重新加(number转varchar2,也许可以清空后再modify column varchar2(1000)),
update TO_POVERTY_MEMBER_D set add_reason='',add_date='',add_date_js='',cut_reason='',cut_date='',cut_date_js='' where stat_time=20190710;

alter table TO_POVERTY_MEMBER_D drop column add_reason;
alter table TO_POVERTY_MEMBER_D drop column add_date;
alter table TO_POVERTY_MEMBER_D drop column add_date_js;
alter table TO_POVERTY_MEMBER_D drop column cut_reason;
alter table TO_POVERTY_MEMBER_D drop column cut_date;
alter table TO_POVERTY_MEMBER_D drop column cut_date_js;

 

alter table TO_POVERTY_MEMBER_D add (
add_reason varchar2(10),
add_date varchar2(10),
add_date_js varchar2(10),
cut_reason varchar2(10),
cut_date varchar2(10),
cut_date_js varchar2(10)
);

标签:cut,错误,需先,MEMBER,add,varchar2,POVERTY,清空,date
来源: https://www.cnblogs.com/jiangqingfeng/p/11214323.html