Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group