Re: Null in the where-clause
От | Darren Ferguson |
---|---|
Тема | Re: Null in the where-clause |
Дата | |
Msg-id | Pine.LNX.4.44.0207081213520.22192-100000@thread.crystalballinc.com обсуждение исходный текст |
Ответ на | Null in the where-clause (michael_walzl@yahoo.de (Michael Walzl)) |
Список | pgsql-general |
No you do not have to re-install the server. When using NULL you may not use the = sign because a null is an undefined piece of data meaning it may exist but you don't know the value or it may not exist or you just don't know what is meant to go into that field. Instead of equal use the IS command and say WHERE field IS NULL This will produce the result you are looking for. HTH Darren On 5 Jul 2002, Michael Walzl wrote: > Hello everybody, > > I've got a problem with the "null"-statement within the where-clause. > I installed the postgres-server 7.2.1 on a Suse Linux machine. > Then I imported an existing databasedump. > But when I make the following query: > select * from tbl_categories where categoryid=null; > I get 0 rows as result, but there are several records, which > corrsponds to my query. > What could be the problem? Do I have to reinstall the server > with a special parameter? > > Thanx in advance > Michael Walzl > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > -- Darren Ferguson
В списке pgsql-general по дате отправления: