Re: [GENERAL] Sorting a table... - Mailing list pgsql-general

From Ed Loehr
Subject Re: [GENERAL] Sorting a table...
Date
Msg-id 384403EA.5D3784A9@austin.rr.com
Whole thread Raw
In response to Sorting a table...  (Jesse Scott <jscott@bmi.net>)
List pgsql-general
I think you're looking for the 'ORDER BY' clause to use in your SELECT, e.g.,

    SELECT * FROM person ORDER BY id

More examples, options, and explanation can be found at

    http://www.postgresql.org/docs/postgres/sql-select.htm

Cheers.
Ed Loehr

Jesse Scott wrote:

> ... Once the user has completed the
> editing, I perform an UPDATE on that row with the new values, but now that
> row is moved to the end of the table, making the page that lists the users
> list them out of order (one of the fields is a sequential ID number).  Is
> there anyway to do a "sort by" or something similar?  Or do I need to set
> the ID number to be some sort of index type?


pgsql-general by date:

Previous
From: Karel Zak - Zakkr
Date:
Subject: Re: [GENERAL] PGSQL C Interface
Next
From: Stan Jacobs
Date:
Subject: Re: [GENERAL] Sorting a table...