Re: [SQL] using LIMIT only on primary table

From: daq <daq(at)ugyvitelszolgaltato(dot)hu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [SQL] using LIMIT only on primary table
Date: 2002-03-02 23:20:59
Message-ID: 10613703764.20020303002059@ugyvitelszolgaltato.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql

Try this:

SELECT *
from order_items
where order_id in (select ID from orders order by ID desc limit 100);

DAQ

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-03-02 23:22:35 Re: using LIMIT only on primary table
Previous Message daq 2002-03-02 23:13:53 Re: select statement...

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-03-02 23:22:35 Re: using LIMIT only on primary table
Previous Message Dan Langille 2002-03-02 22:35:31 using LIMIT only on primary table