[SQL] Re: enumerating rows

2001-04-14 Thread Kovacs Zoltan
> Try this > > CREATE SEQUENCE just_a_seq; > Select nextval('just_a_seq') as row_no, * from pg_tables ; > drop SEQUENCE just_a_seq; Wow! Great idea! :-) In fact I need row numbering in browsing and printing invoices. They should be read on various platforms (Windows clients, generated HTML a

[SQL] Re: enumerating rows

2001-04-13 Thread Luis C. Ferreira
Try this CREATE SEQUENCE just_a_seq; Select nextval('just_a_seq') as row_no, * from pg_tables ; drop SEQUENCE just_a_seq; > > row_no | column1 | column2 | ... > ---+-+-+ ... > 1 | datum11 | datum12 | ... > 2 | datum21 | datum22 | ... >... | ... | ..

[SQL] Re: enumerating rows

2001-04-11 Thread Joel Burton
On Wed, 11 Apr 2001, Kovacs Zoltan wrote: > > Here is a method which is fairly cumbersome, but will do what you want. > > (Whether what you want is useful, is another matter. The row numbers > > have no meaning except to delineate which row is printed after which; they > > bear no relation to th