Re: Differentiate Between Zero-Length String and NULLColumn Values
От | D'Arcy J.M. Cain |
---|---|
Тема | Re: Differentiate Between Zero-Length String and NULLColumn Values |
Дата | |
Msg-id | 20070130113834.fa8d09e0.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
Re: Differentiate Between Zero-Length String and NULLColumn Values |
Список | pgsql-sql |
On Tue, 30 Jan 2007 09:23:32 -0500 Andrew Sullivan <ajs@crankycanuck.ca> wrote: > 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 :) I don't have an Oracle installation here and I haven't used it much but I wonder if they treat the following two statements differently. SELECT * FROM table WHERE column IS NULL; SELECT * FROM table WHERE column = NULL; The latter violates the SQL spec and is not allowed by PostgreSQL without setting a special flag. Is it possible that Oracle accepts "=" against NULL and also treats it slightly differently? -- D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
В списке pgsql-sql по дате отправления: