有数据的话不能修改数据类型,看来你只能先备份表的内容,然后删除再修改后导入了!
create table tb_bk as select * from tab;
truncate table tb_bk;
alter table modify ....
insert into tab select * from tb_bk;
commit;
SQL> alter table testb modify id number;alter table testb modify id numberORA-01439: 要更改数据类型,则要修改的列必须为空 (empty)
create table tb_bk as select * from tab;
truncate table tb_bk;
alter table modify ....
insert into tab select * from tb_bk;
commit;
SQL> alter table testb modify id number;alter table testb modify id numberORA-01439: 要更改数据类型,则要修改的列必须为空 (empty)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货