Re: Numbering rows

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Numbering rows
Дата
Msg-id 4EF01D4FCE524CA7BD910086553D2CD0@amd64
обсуждение исходный текст
Ответ на Re: Numbering rows  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: Numbering rows  (Mark Morgan Lloyd <markMLl.pgsql-general@telemetry.co.uk>)
Список pgsql-general
Andreas Kretschmer wrote:
> Can you show an example for 8.4?

It's not 100% certain that it will be possible for 8.4, probably though.

select row_number() over (order by employeeid) as nrow,* from employee order
by employeeid

It's important to have both the order bys

There is more information on windowing functions here
http://en.wikipedia.org/wiki/SELECT

David.


В списке pgsql-general по дате отправления:

Предыдущее
От: Michele Petrazzo - Unipex srl
Дата:
Сообщение: Re: No select permission on a table but can query it
Следующее
От: Murray Fox
Дата:
Сообщение: Re: Problems with Timezones in Australia