Re: select * from mytable where myfield=null;

Поиск
Список
Период
Сортировка
От Hoanui Morangie
Тема Re: select * from mytable where myfield=null;
Дата
Msg-id 20020514145727.F1D47BFB3@xmxpita.excite.com
обсуждение исходный текст
Ответ на select * from mytable where myfield=null;  (blamouret <bruno.lamouret@westcast-systems.com>)
Список pgsql-jdbc
To my order-invoice example: there are not many choices, I know only three:

1) use NULL value and build proper query (x=? or x is null),
2) use dummy tupples and values (Marin's solution),
3) give up foreign key constraints on the database level and rely on the middle tier.

I have chosen 1).

Hoanui

--- On Tue 05/14, Tom Lane wrote:
> "Marin Dimitrov" writes:
> > don't use NULLs
>
> I agree with Marin. If you think you need x = NULL to act like x IS
> NULL, then you should rethink the way you are using NULL in your data
> design. You are really swimming against the tide of the way that SQL
> specifies NULL to work.
>
> regards, tom lane
>


Join Excite! - http://www.excite.com
The most personalized portal on the Web!

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: select * from mytable where myfield=null;
Следующее
От: Cathal de Brun
Дата:
Сообщение: Re: j2ee compatiable jdbc driver on jdbc.postgresql.org?