Skip site navigation (1) Skip section navigation (2)

Re: How to convert this mysql syntax

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Jeff Eckermann" <jeff_eckermann(at)yahoo(dot)com>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: How to convert this mysql syntax
Date: 2005-02-04 18:33:47
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3412A7612@Herge.rcsinc.local (view raw or flat)
Thread:
Lists: pgsql-odbc
> > > csSql += _T( "UserID     INTEGER    NOT NULL
> > > AUTO_INCREMENT,"    );
> 
> csSql += _T( "UserID     SERIAL    NOT NULL,"    );
> 
or,
csSql += _T( "UserID     SERIAL    PRIMARY KEY,"    );

Primary keys get the not null automatically.  Serial, by the way, is
just shorthand for defaulting the primary key to a value pulled from a
sequence.  It as a non standard extension just like AUTO_INCREMENT is,
but it is a *much* better abstraction of an incrementing key.

Merlin


pgsql-odbc by date

Next:From: Gastón GordilloDate: 2005-02-04 19:38:28
Subject: ODBC DLL register
Previous:From: Jeff EckermannDate: 2005-02-04 14:49:49
Subject: Re: How to convert this mysql syntax

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group