pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yudie <yudie@axiontech.com>
To: pgsql-sql@postgresql.org
Subject: How to select and result row number??
Date: Fri, 13 Sep 2002 14:17:13 -0500
Message-ID: <001301c25b5a$2ef0ea40$8a01a8c0@yudie> (raw)

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

view thread (9+ messages)  latest in thread

Message-ID: <001301c25b5a$2ef0ea40$8a01a8c0@yudie>
Permalink:  ../001301c25b5a$2ef0ea40$8a01a8c0@yudie/
Also on:    postgresql.org/message-id/001301c25b5a$2ef0ea40$8a01a8c0@yudie

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: yudie@axiontech.com
  Subject: Re: How to select and result row number??
  In-Reply-To: <001301c25b5a$2ef0ea40$8a01a8c0@yudie>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox