IN and subselects

Поиск
Список
Период
Сортировка
От Brook Milligan
Тема IN and subselects
Дата
Msg-id 199806292228.QAA05019@trillium.nmsu.edu
обсуждение исходный текст
Список pgsql-sql
I am having problems getting IN in WHERE clauses to work together with
subselects.  That is, I want to do something like

     select * from a where a.id in (select id from b where b.n = 7);

The typical outcome is that no rows are selected even though some
match the criterion.  Doing the equivalent EXISTS condition will often
work, but I cannot always get it to work.

Is there a known problem with using IN?

Thanks for your help.

Cheers,
Brook

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

Предыдущее
От: James Olin Oden
Дата:
Сообщение: Re: [SQL] Finding strings inside a field...
Следующее
От: Zsolt Varga
Дата:
Сообщение: Re: [SQL] Finding strings inside a field...