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

From: "andi" <andi(at)mobile-elab(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly
Date: 2006-05-26 10:11:26
Message-ID: 20060526101207.5C4B35B0B83@svr4.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Penchalaiah P. 2006-05-26 10:31:47 hi how to use encryption for incomtax in postgresql
Previous Message Alban Hertroys 2006-05-26 09:25:37 Re: [SQL] (Ab)Using schemas and inheritance