How to select and result row number??

From: "Yudie" <yudie(at)axiontech(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: How to select and result row number??
Date: 2002-09-13 19:17:13
Message-ID: 001301c25b5a$2ef0ea40$8a01a8c0@yudie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I would like to select and also give numbering in each record.
Let say I have table 'City' with a 'cityname' column

what is the select statement so I can get result records like this

no cityname
---- --------------
1 NEW YORK
2 LOS ANGELES
3 HOUSTON
4 ....
5 ...

Thank you.

Yudie

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message jaya prakash 2002-09-13 23:04:42 does table names have a format and size
Previous Message Josh Berkus 2002-09-13 19:04:15 Re: Want to test beta, but ...