Thread
-
Re: [HACKERS] AUTO_INCREMENT suggestion
Mattias Kregert <matti@algonet.se> — 1998-03-09T12:08:10Z
ocie@paracel.com wrote: > > > the Autonumber feature in Access as well. > > > > > > create table tblFirm ( > > > FirmID int PRIMARY KEY AUTO_INCREMENT, > > > Informix calls something like this SERIAL type, like: > > > > create table tblFirm ( > > FirmID SERIAL PRIMARY KEY, > > FirmTypeID int, > > FirmName varchar(64) NOT NULL, > > FirmAlpha char(20) NOT NULL UNIQUE, > > FirmURL varchar(64), > > FirmEmail varchar(64) > > ); > > > > Don't know if that is standrd or extension. > > Sybase calls this an identity. I don't think there is a standard name > for this, sigh. > > Ocie How about adding all those keywords? AUTONUMBER, IDENTITY, AUTO_INCREMENT, SERIAL Then, anybody could switch to PostgreSQL without having to relearn this. Would it be possible to have a "compatability" variable, like this? psql=> set sqlmode to {STRICT_ANSI|POSTGRESQL|ORACLE ...} so that ppl can set it to STRICT when they want to write portable SQL, and PGSQL when they want all these nice features? /* m */