Amazing difference between CHAR and VARCHAR

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]




Oracle LazyDBA home page