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: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly
Date: 2006-05-24 10:35:10
Message-ID: 20060524103549.1E41C5AF071@svr4.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear friends,

I have table

MD_CUSTOMER

MD_CUSTOMERIDPK integer primary key

NAME varchar

But my primary key is not in correct order like

MD_CUSTOMER

MD_CUSTOMERIDPK NAME

10
ANDI

33
TESTER

100 KKK

, so I want to make other primary key to generate sequences 1, 2, 3, . and
in MS SQL SERVER 2005

I can with Rank() function , but in Postgres how ?

PLEASE any one can help me, I am really appreciate.

Best regards

Andi kusnadi

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2006-05-24 11:27:17 Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly
Previous Message Alban Hertroys 2006-05-24 09:09:38 Re: [SQL] (Ab)Using schemas and inheritance