Re: [INTERFACES] Autoincrement - Mailing list pgsql-interfaces

From Antonio Garcia Mari
Subject Re: [INTERFACES] Autoincrement
Date
Msg-id 199807171006.GAA29551@hub.org
Whole thread Raw
In response to Autoincrement  (Wari Wahab <wari@technology.com>)
List pgsql-interfaces
> 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)


pgsql-interfaces by date:

Previous
From: leif@danmos.dk
Date:
Subject: Re: [INTERFACES] ODBC driver for Applixware and Unix
Next
From: Federico Passaro
Date:
Subject: Re: [INTERFACES] Autoincrement