From: Patrice DUMAS <pdumas@inforoutes-ardeche.fr>
To: pgsql-sql@postgreSQL.org
Subject: Unique Number KEY
Date: Fri, 26 Feb 1999 18:42:40 +0100
Message-ID: <000901be61af$7018d800$ce9efea9@blneige> (raw)
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@inforoutes-ardeche.fr
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: pdumas@inforoutes-ardeche.fr
Subject: Re: Unique Number KEY
In-Reply-To: <000901be61af$7018d800$ce9efea9@blneige>
References: <000901be61af$7018d800$ce9efea9@blneige>
* 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