我猜楼主的意思仅仅是想把表1中A字段的长度改为300,我通常会借助一个临时表来完成(主要是考虑到8i以前的版本不支持drop column)。假定有表table1(col1,col2...),想把col1的长度从600缩小到300,如下操作: create table tmp as select * from table1; truncate table table1; alter table table1 modifiy col1(300); insert into table1 select * from tmp; drop table tmp;
insert into table2 ( select * from table1);否则
update table2 set (a,b,c....) = ( select a,b,c ..... from table1 );
update table2 set (a,b,c....) = ( select a,b,c ..... from table1 where lengthb(a)<=300 );
create table tmp as select * from table1;
truncate table table1;
alter table table1 modifiy col1(300);
insert into table1 select * from tmp;
drop table tmp;