1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
SQL> create table t1 as select 'x' x from dual union all select 'zzz' x from dual;
Table created.
SQL> create table t(x char);
Table created.
SQL> insert into t select * from t1;
insert into t select * from t1
*
ERROR at line 1:
ORA-12899: value too large for column "SCOTT"."T"."X" (actual: 3, maximum: 1)
SQL> set serverout on
SQL> declare pragma autonomous_transaction; begin for c in (select * from t1) loop begin insert into t values (c.x); exception when others then dbms_output.put_line('x='||c.x); end; end loop; rollback; end;
2 /
x=zzz
PL/SQL procedure successfully completed. |