Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Null and empty string program? ( Urgent !!! )
>> I'm trying to insert a value empty string ( '' ) into a column which
is not null but it return an error to me. <<
This is going to drive you nuts becuase Oracle has gotten this all wrong. In the SQL-92 Standard, all CHAR(n) and VARCHAR(n) -- there is no such crap as VARCHAR2 in real SQL -- must have a value of (n) > 0. When you attempt to store an empty string, it is padded out with blanks. Ergo, uyou cannot store an empty in SQL-92.
Furthermore, SQL-92 is consistent in that NULLs propagate and empty strngs have no effect on concatenation:
'abc' || NULL = NULL
'abc' || '' = 'abc'
You have to write a lot of work-around code to get Oracle to act like SQL. Sorry. You should have bought DB2.
--CELKO--
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 09 2000 - 18:48:56 CST
![]() |
![]() |