Re: Differentiate Between Zero-Length String and NULLColumn Values

Поиск
Список
Период
Сортировка
Искать
От
Herouth Maoz
Тема
Re: Differentiate Between Zero-Length String and NULLColumn Values
Дата
Msg-id
200701301637.43897.herouth@tippcom.co.il
Ответ на
Список
Дерево обсуждения
Differentiate Between Zero-Length String and NULL Column Values "Phillip Smith" <phillip.smith@weatherbeeta.com.au>
Re: Differentiate Between Zero-Length String and NULL Column Values Michael Fuhr <mike@fuhr.org>
Re: Differentiate Between Zero-Length String and NULL Column Values Andrew Sullivan <ajs@crankycanuck.ca>
Re: Differentiate Between Zero-Length String and NULLColumn Values "Bart Degryse" <Bart.Degryse@indicator.be>
Re: Differentiate Between Zero-Length String and NULLColumn Values Andrew Sullivan <ajs@crankycanuck.ca>
Re: Differentiate Between Zero-Length String and NULLColumn Values "D'Arcy J.M. Cain" <darcy@druid.net>
Re: Differentiate Between Zero-Length String and NULLColumn Values Andrew Sullivan <ajs@crankycanuck.ca>
Re: Differentiate Between Zero-Length String and NULLColumn Values Geoff Tolley <geoff@polimetrix.com>
Re: Differentiate Between Zero-Length String and NULLColumn Values Jamie A Lawrence <jal@clueinc.net>
Re: Differentiate Between Zero-Length String and NULLColumn Values Jan Wieck <JanWieck@Yahoo.com>
Re: Differentiate Between Zero-Length String and NULLColumn Values Peter Eisentraut <peter_e@gmx.net>
Re: Differentiate Between Zero-Length String and NULLColumn Values BillR <iambill@williamrosmus.com>
Re: Differentiate Between Zero-Length String and NULLColumn Values Andrew Sullivan <ajs@crankycanuck.ca>
Re: Differentiate Between Zero-Length String and NULLColumn Values Herouth Maoz <herouth@tippcom.co.il>
Re: Differentiate Between Zero-Length String and NULLColumn Values Tomas Vondra <tv@fuzzy.cz>
Andrew Sullivan Wrote:

> On Tue, Jan 30, 2007 at 02:38:07PM +0100, Bart Degryse wrote:
> > Andrew, I think you're wrong stating that Oracle would interpret
> > NULL and empty string as equal. The Oracle databases I use (8, 9
> > and 10) certainly make a distiction between both values. Maybe
> > earlier versions did so, that I don't know.
>
> Hmm.  Well, I'm not an Oracle guy, so I don't really know.  All I
> know is that we occasionally get people coming from Oracle who are
> surprised by this difference.  What I've been _told_ is that '' and
> NULL are under some circumstances (maybe integers?) the same thing,
> whereas of course ' ' and NULL are not.  But since I'm not an Oracle
> user, people should feel free to ignore me :)

Sybase does something like that... In sybase, null and empty string are the 
same. However, to avoid the equality ''=NULL, they actually interpret '' as a 
single space. So if you do something like SELECT 'A'+''+'C' (concatenation is 
+ in sybase), it results in 'A C'. Null is a "real" empty string in that its 
length is zero, and if you insert a trim('') into a column, it will treat it 
as NULL.

Herouth

В списке pgsql-sql по дате отправления
От: Andrew Sullivan
Дата:
От: Ezequias Rodrigues da Rocha
Дата:
Сообщение: Linked Databases
FAQ