Received: from mailer.at4.net ([194.179.36.135]) by hub.org (8.8.8/8.7.5) with SMTP id GAA29551 for ; Fri, 17 Jul 1998 06:06:15 -0400 (EDT) Message-Id: <199807171006.GAA29551@hub.org> Received: from piolin [192.168.38.17] by in.at4.net [192.168.38.3] with SMTP (MDaemon.v2.7.SP3.R) for ; Fri, 17 Jul 1998 11:50:18 +0200 From: "Antonio Garcia Mari" To: Wari Wahab , pgsql-interfaces@postgreSQL.org Date: Fri, 17 Jul 1998 11:47:04 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: [INTERFACES] Autoincrement Priority: normal In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.01a) X-MDaemon-Deliver-To: pgsql-interfaces@postgreSQL.org > Hi, is there a way to do a field that can automatically increment itself, > like in paradox or dbase? > this is a hack, but it works... CREATE SEQUENCE key_s INCREMENT 1 START 1; CREATE TABLE cliente ( key int4 NOT NULL DEFAULT nextval('key_s') PRIMARY KEY, name varchar(100) UNIQUE NOT NULL, username varchar(8) NOT NULL ); Antonio Garcia Mari Mallorca (Spain)