Re: NULL behavior in ORACLE vs SYBASE
Date: 1995/05/11
Message-ID: <D8FCJH.GMt_at_cs.dal.ca>#1/1
My-Phuong L Tran (mtran2_at_osf1.gmu.edu) wrote:
: In article <3odi96$qup_at_newsbf02.news.aol.com> roywagner_at_aol.com (Roy Wagner) writes:
: >We just had an interesting discussion on a similar topic of NULLs and
: >Oracle and MS Access.
: >
: >My tests on Oracle showed that you can do the following:
: >
: >INSERT INTO table VALUES (NULL);
: >INSERT INTO table VALUES (''); <---- That's TWO SINGLE QUOTES.
: >
: >When tested for IS NULL both will be selected. When tested for = '', none
: >will be selected. So an empty string is set equal to NULL. Also note that
: >a string of ONE SPACE is stored as one space, one two TWO as two, etc.
: Actually, if you follow the logic of this there apparently is no such value as
: ''. Oracle converts all inserted '' values to NULLs. Is there a way to
: get a '' into the database? This would be tested by differing select
: statements. Anyone?
: Best,
: Ted Karas
mmmmmmm interesting, yet if you
INSERT INTO table VALUES (''''''); <---- yes, that is six single quotes
and then do a
SELECT * FROM table;
column
you will get
--
''
or
SELECT * FROM table
WHERE column = '''''';
will also return the same thing!
I don't understand it but there it is
--
Murray Kaiser | Usual gutless disclaimer..
Nova Scotia Power | Opinions are mine and not necessarily
(Murray.Kaiser_at_NSPower.NS.CA) | shared by my employer
Received on Thu May 11 1995 - 00:00:00 CEST