Am Die, 2003-05-27 um 19.37 schrieb Fontenot, Paul:
> When creating a table how do you make an auto incrementing field? I'm
> using:
>
> Create table hosts (
> id int not null unique primary key,
> ip char(16),
> hostname text
> );
>
> Is there a way to make the host.id field automagicaly increment?
id SERIAL PRIMARY KEY
will be translated into int with auto value automatically
P.S.: Primary Keys are automatically not null
HTH
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : www.e-trolley.de