select items, and max id

Поиск
Список
Период
Сортировка
От Luis H.
Тема select items, and max id
Дата
Msg-id 001401c36dd2$e8097700$0301a8c0@bigbertha
обсуждение исходный текст
Ответ на Force Lock  ("Girish Bajaj" <gbajaj@tietronix.com>)
Ответы Re: select items, and max id  (Bruno Wolff III <bruno@wolff.to>)
Re: select items, and max id  (Nabil Sayegh <postgresql@e-trolley.de>)
Список 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 по дате отправления:

Предыдущее
От: "Girish Bajaj"
Дата:
Сообщение: Force Lock
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Force Lock