Search Postgresql Archives

Re: select where in and order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tony Smith wrote:
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)

Why not

select * from action a, group g where a.id=g.action_id order by rank desc;

?

--
Postgresql & php tutorials
http://www.designmagick.com/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux