| От | Thomas Kellerer |
|---|---|
| Тема | Re: numbering rows in a view |
| Дата | |
| Msg-id | h7dp77$mi1$1@ger.gmane.org обсуждение исходный текст |
| Ответ на | numbering rows in a view (richard terry <rterry@pacific.net.au>) |
| Ответы |
Re: numbering rows in a view
|
| Список | pgsql-novice |
richard terry wrote on 30.08.2009 13:26: > I need a unique numbering for a view row and I can recall somewhere that > postgres was getting a new function which would enable this to happen, I've > searched the docs but I mustn't be putting in the right key words, so I > wondered if someone could enlighten me. You are probably looking for row_number() which was introduced in 8.4 http://www.postgresql.org/docs/current/static/functions-window.html Something like: SELECT <your_column_list_here>, row_number() over () FROM ... Thomas
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера