Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Fun With VARCHAR2
Oracle 8.1.5, NT 4.0 SP 6
I get two different error messages depending on the length of a varchar2. Both are too long, but they yield different error messages:
SQL>
SQL> create table test (n varchar2 (2000));
Table created.
real: 351
SQL>
SQL> declare
2 s varchar2 (4000):= lpad ('x', 4000, 'x');
3 begin
4 insert into test (n) values (s);
5 end;
6 /
declare
*
ERROR at line 1:
ORA-01401: inserted value too large for column
ORA-06512: at line 4
real: 310
SQL>
SQL> declare
2 s varchar2 (4001):= lpad ('x', 4001, 'x');
3 begin
4 insert into test (n) values (s);
5 end;
6 /
declare
*
ERROR at line 1:
ORA-01461: can bind a LONG value only for insert into a LONG column
ORA-06512: at line 4
real: 0
SQL>
SQL> drop table test;
Table dropped.
Funny, isn't it? You would never expect an error message about a long column unless you use longs, right?
Martin Received on Sat Apr 08 2000 - 00:00:00 CDT
![]() |
![]() |