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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-odbc by date

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