Re: boolean

Поиск
Список
Период
Сортировка
От Stephane Bortzmeyer
Тема Re: boolean
Дата
Msg-id 20020920131436.GA28459@nic.fr
обсуждение исходный текст
Ответ на boolean  ("Henrik Steffen" <steffen@city-map.de>)
Список pgsql-general
On Fri, Sep 20, 2002 at 02:49:25PM +0200,
 Henrik Steffen <steffen@city-map.de> wrote
 a message of 113 lines which said:

> and if i insert into foo (foobar) values('bar') without
> explicitly inserting a value for bar, the bar column of this
> particular row will be empty. it's neither 't' nor 'f'.

Actually, it will be NULL. Unless you add a constraint NOT NULL to the
column.

> But I want to know, how I can select all rows which neither
> match 't' nor 'f' ? To perform an update like
>
> UPDATE foo SET bar='t' WHERE bar=null;

... WHERE bar IS NULL;

(It is a common SQL problem, the handling of NULL values. Read any
book about SQL.)


В списке pgsql-general по дате отправления:

Предыдущее
От: "Henrik Steffen"
Дата:
Сообщение: boolean
Следующее
От: Murali Mohan Kasetty
Дата:
Сообщение: Data Dump Issue