Search Postgresql Archives

Re: Automatic row numbering / sequence in view ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



am  Tue, dem 10.10.2006, um 16:33:03 +0200 mailte Arnaud Lesauvage folgendes:
> Hi List !
> 
> I need to add a column to a view, which would contain an automatically 
> generated sequence.
> An automatic row numbering would do the trick (I only need unique 
> numbers, that's all), but I don't even know how to achieve this.
> Does anybody have a solution for this problem ?

create sequence foo;
select nextval('foo'), * from <yourtable>;


HTH, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux