Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: VARCHAR2: NULL value vs. empty string - Proof Oracle Supports Zero Length Strings
Frank wrote:
> Daniel Morgan wrote:
>
>> Frank wrote: >> >>> Keith Sauvant wrote: >>> >>>> Hi Group, >>>> >>>> is there _any_ way (Server Parameter?) to make Oracle store empty >>>> strings in Varchar2s without converting them to NULL? >>>> >>>> Thanks in advance >>>> Keith Sauvant >>>> >>> >>> No. Oracle != MS SQL Server (And not ANSI compliant in this matter) >> >> >> >> This has nothing to do with ANSI compliance. Where did you ever get >> the idea that it did? >> >> I'd suggest you read page 38 of Tom Kyte's "Expert one-on-one Oracle." >>
First of all there is no such thing as an ANSI standard if one defines "an" as meaning a singular entity. The ANSI standard is not one thing. The standard consists of three separate compliance levels. All major commercial RDBMS products are level 1 compliant. What you folks have been posting is pure unadulterated nonsense as you have likely never actually read the standard and are make assumptions based on marketing hyperbole and an assuming that if it isn't done the Microsoft way it most be wrong. The truth is that SQL Server is NOT ANSI compliant on default installation. It achieves compliance ONLY by modifying its defaults.
In the ANSI standard NULL is defined as the lack of a value ... not as a zero length string and this is not subject to debate. It is the definition.
Does Oracle support zero length strings? Absolutely. That you don't know it is evidence that you have not been keeping up with Oracle. As you know in version 9i Oracle added full support for ANSI joins. It also added support for zero length strings. And here's the proof.
COL typeName FORMAT a20
Now you have the proof.
If you want to retrieve that empty string you will need to either go to http://tahiti.oracle.com and learn how to use the anyData data type or take my class at the University of Washington. I have two open seats for the Winter Quarter starting in January ;-)
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sun Dec 14 2003 - 12:20:49 CST