Hi Amar,
I didn't find that problem with 10g rel2:
[Email Address Removed] create table test (
2 col1 char(26),
3 col2 varchar2(26));
Table created.
[Email Address Removed] insert into test values
2 ('12345678901234567890123456',
3 '12345678901234567890123456');
1 row created.
Of course if you started counting at zero...
'012345678901234567890123456' is 27 characters and doesn't fit! ;-)
Mick Holstead
IT Development
Weatherbys Ventures LTD
Sanders Road
Wellingborough
NN8 4BX
-----Original Message-----
From: Amar P. Singh
[mailto:oracledba-ezmlmshield-x37882036.[Email address protected]
Sent: 05 July 2006 15:19
To: LazyDBA Discussion
Subject: Amazing difference between CHAR and VARCHAR
Hi,
Today I found some interesting difference in CHAR and VARCHAR datatypes.
I have one table temp1(tcol char(26)). When from my application I try to
insert a row in it with 26 characters it shows me the error
ORA-01401: inserted value too large for column
But when I change the datatype from char(26) to varchar2(26) it works
for me and I am able to insert the data successfully. Can you guys tell
me what is this happening.
With Regards,
Amar P Singh
desk: +91 124 4167037
mobile: +91 (0) 9810788298
e-mail: [Email address protected]
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page