How much characters in varchar2 length 4000? [message #372526] |
Tue, 20 February 2001 04:01 |
Mucky
Messages: 7 Registered: February 2001
|
Junior Member |
|
|
Can anyone tell me how much charakters i can put in a varchar2 field with length 4000?
How can i calculate this?
It seems that the max. number of characters in such a field is 2000.
THX
|
|
|
|
Re: How much characters in varchar2 length 4000? [message #372542 is a reply to message #372526] |
Wed, 21 February 2001 03:37 |
Mucky
Messages: 7 Registered: February 2001
|
Junior Member |
|
|
Hi Andrew,
thanks, but iīm not that much into oracle, so i donīt understand what your solution is good for and how to do it. Can i get with your solution the length of a varchar2 field?
I tried to put 2000 characters in a varchar2 field length 2000, and it works. But when i try to put more than 2060 charakters in a varchar2 field length 4000 i become an error. Whatīs the problem?
sorry for my ignorance...
|
|
|
Re: How much characters in varchar2 length 4000? [message #372545 is a reply to message #372542] |
Wed, 21 February 2001 09:34 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
-- Create a test table in sqlplus
create table big_varchar4000 (col1 varchar2(4000));
-- try inserting some test data
insert into big_varchar4000 values (lpad( 'a', 4000, 'b'));
-- lpad( 'a', 4000, 'b') creates a string like "bbbb...bbbba" of total length 4000
-- check the length of the actual data inserted
select length(col1) from big_varchar4000;
This is only abailable in Oracle 8.x, it was 2000 in Oracle 7.x
|
|
|
|