Unique Number KEY

From: "Patrice DUMAS" <pdumas(at)inforoutes-ardeche(dot)fr>
To: <pgsql-sql(at)postgreSQL(dot)org>
Subject: Unique Number KEY
Date: 1999-02-26 17:42:40
Message-ID: 000901be61af$7018d800$ce9efea9@blneige
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

What is the best way, with PostGres, to create a Unique Number Key
Generator?

For example, I have a STUDENTS table:
{
StudentNumber integer;
StudentName char[40];
...
}

Beginner in SQL, I think I must use Primary key or something like that, to
be sure StudentNumber is unique.
But, I want StudentNumber to be generated automatically, the user don't
worry in assigning a StudentNumber.

What is the best way to do that with PostGres-SQL ?

Thank you for your answers and sorry for my poor english,

Patrice DUMAS
Ardèche, FRANCE.
pdumas(at)inforoutes-ardeche(dot)fr

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message CIMPOESU Teodor 1999-02-26 18:25:17 Re: [SQL] Unique Number KEY
Previous Message Remigiusz Sokolowski 1999-02-26 07:25:25 Re: [SQL] CREATE TABLE