Re: sequence number in a result

Поиск
Список
Период
Сортировка
От Relyea, Mike
Тема Re: sequence number in a result
Дата
Msg-id 1806D1F73FCB7F439F2C842EE0627B1809BAD331@USA0300MS01.na.xerox.net
обсуждение исходный текст
Ответ на sequence number in a result  ("Campbell, Lance" <lance@illinois.edu>)
Список pgsql-sql
>  Is there a function or special system label I can use that would
generate a sequence number in the returning result set?


Would something like this work for you?

CREATE TEMP SEQUENCE foo;
SELECT a, b, c, nextval('foo') AS order FROM t1 ORDER BY a;

Mike Relyea
Product Development Engineer
Xerox Corporation
Building 218 Room 107
800 Phillips Rd
Webster, NY 14580

p 585.265.7321


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