pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: andi <andi@mobile-elab.com>
To: pgsql-sql@postgresql.org
Subject: Re: PLEASE  help ME , HOW TO GENERATE PRIMARY Keys on the fly
Date: Fri, 26 May 2006 17:11:26 +0700
Message-ID: <20060526101207.5C4B35B0B83@svr4.postgresql.org> (raw)

When  I use this syntax

select * from TESTER;

I got 

 

TESTERIDPK  TESTER_NAME

10          TESSSS

90          NAMAAAA

100         UUUUU

 

In ms sql server 2005 I use this 

select rank() over(order by testeridpk ) as rank , * from tester;

I get the result is like this, 

 

RANK   TESTERIDPK       TESTER_NAME

1     10                TESSS

2     90                NAMAAA

3     100               UUUUUUUU

 

 

How in postgres sql I get the same result , please help me, because iam
really frustating with this duty.

 

Thank you

view thread (11+ messages)  latest in thread

Message-ID: <20060526101207.5C4B35B0B83@svr4.postgresql.org>
Permalink:  ../20060526101207.5C4B35B0B83@svr4.postgresql.org/
Also on:    postgresql.org/message-id/20060526101207.5C4B35B0B83@svr4.postgresql.org

 · 

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: andi@mobile-elab.com
  Subject: Re: PLEASE  help ME , HOW TO GENERATE PRIMARY Keys on the fly
  In-Reply-To: <20060526101207.5C4B35B0B83@svr4.postgresql.org>

* 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