Received: from cheylard.inforoutes-ardeche.fr (root@cheylard.inforoutes-ardeche.fr [195.101.206.1]) by hub.org (8.9.2/8.9.1) with ESMTP id MAA50944 for ; Fri, 26 Feb 1999 12:43:21 -0500 (EST) (envelope-from pdumas@inforoutes-ardeche.fr) Received: from blneige (ppp23.inforoutes-ardeche.fr [195.101.206.119]) by cheylard.inforoutes-ardeche.fr (8.9.2/8.9.2) with SMTP id SAA06843 for ; Fri, 26 Feb 1999 18:34:18 +0100 (MET) Message-ID: <000901be61af$7018d800$ce9efea9@blneige> From: "Patrice DUMAS" To: Subject: Unique Number KEY Date: Fri, 26 Feb 1999 18:42:40 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 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