select where in and order

From: Tony Smith <quickcur(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: select where in and order
Date: 2006-03-10 02:32:31
Message-ID: 20060310023231.84845.qmail@web52702.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have two tables action and group:

action
------------------------
id,
name

group:
------------------------
action_id
rank

I what to select from action table by order by the
rank in the group table.

If I use

select * from action where id in (select action_id
from group order by rank)

The action may not be ordered by rank. How can I do
it?

Thanks,

qq

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-10 02:43:11 Re: Run PostgreSQL with Administrator account in Windows
Previous Message Joshua D. Drake 2006-03-10 02:26:20 Re: Run PostgreSQL with Administrator account in Windows