alter table 表2 modify(A varchar2(600));

解决方案 »

  1.   

    我要Update表2,但表1中已有数据,且就是需要表1中的数据,
      

  2.   

    那表1中A字段长度超过300的怎么办?若表2中没有表1的数据,那么
    insert into table2 ( select * from table1);否则
    update table2 set (a,b,c....) = ( select a,b,c ..... from table1 );
      

  3.   

    最好長度改為相同再操作,如果不能修改表结构就
    update table2 set (a,b,c....) = ( select a,b,c ..... from table1 where lengthb(a)<=300 );
      

  4.   

    如果你的表中有数据了就很难修改表结构了,如果没有数据可以修改表结构阿,alter table 表2 modify(A varchar2(600)); 然后insert into table2 ( select * from table1);
      

  5.   

    最好把表2的A字段改为VARCHAR2(600),有无数据无所谓,他不会影响你表中的数据
      

  6.   

    我现在就是需要表1中的数据,但必需把字段改小,因为字段宽度超过VARchar2(256),用dbmemo控件绑定记录多时就会出错,
      

  7.   

    我猜楼主的意思仅仅是想把表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;