Re: silly NULL question
От | Rod Taylor |
---|---|
Тема | Re: silly NULL question |
Дата | |
Msg-id | 1059089115.90090.8.camel@jester обсуждение исходный текст |
Ответ на | silly NULL question (Dan Weeks <danimal@wildbrain.com>) |
Ответы |
Re: silly NULL question
|
Список | pgsql-sql |
> Would return the row. Now with an upgrade to PostgreSQL 7.3 (yes, I know > there are many changes and we're working through them right now) the same > query returns nothing. Dropping the "AND parent_id = NULL" returns the row > as expected. NULL is similar to UNKNOWN. So, NULL = NULL is the similar to UNKNOWN = UNKNOWN. Since you don't know it, how can you tell if they're equal or not? Syntax you're looking for is: AND parent_id IS NULL If you really really really need = NULL (due to some MS product which ignores SQL standards -- say MS Access) there is a toggle in the postgresql.conf file to allow automated conversion of = NULL to IS NULL within the server.
В списке pgsql-sql по дате отправления: