Sorry if this is a double posting, I think the previous message was lost.

I have two tables
T (
id int primary key,
a int,
b int
)

T2 (
id int references T,
c int
);

and I wish to get 20 lines from T  like this

select id,a,b from T where id not in (select id from T2 where c=5) limit 20;

but that does not seem to work. How can I get what I want? What 20
records are selected is not important. I just need 20.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to