select items, and max id - Mailing list pgsql-novice

From Luis H.
Subject select items, and max id
Date
Msg-id 001401c36dd2$e8097700$0301a8c0@bigbertha
Whole thread Raw
In response to Force Lock  ("Girish Bajaj" <gbajaj@tietronix.com>)
Responses Re: select items, and max id
Re: select items, and max id
List pgsql-novice
I have a table where each row has an id unique identifier (separate from the one postgreql does automatically). I want to be able to do a certain SELECT query returning various rows, and also be able to check what the maximum id was among the rows in the result. Is it possible to do this all in the same query? Right now I do it in a very dumb way -- I execute the query to get all the data, and then I re-execute it as a subquery and pull out the max(id).
 
Thanks.
 
 
 

pgsql-novice by date:

Previous
From: "Girish Bajaj"
Date:
Subject: Force Lock
Next
From: Bruno Wolff III
Date:
Subject: Re: Force Lock