From: | Nabil Sayegh <postgresql(at)e-trolley(dot)de> |
---|---|
To: | "Eduardo V(dot) Rodríguez" <evazquez(at)insys-corp(dot)com(dot)mx> |
Cc: | "Postgres (E-mail)" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Primary Key |
Date: | 2004-06-15 09:55:05 |
Message-ID: | 40CEC779.5070703@e-trolley.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Eduardo V. Rodríguez wrote:
> id - month . day - time
> 1 Jan 22 16:15
> 2 Jan 22 16:16
> 3 Jan 22 16:17
> 4 Jan 22 16:18
>
> But I pretend that automatically when I made an INSERT INTO table (month,
> day, time) values (A,B,C) the primary key update his value increasing by one
CREATE TABLE foo (id_foo SERIAL PRIMARY KEY, month ...);
SERIAL is of type int creates automatically a sequence that increments each time you don't specify
the id in an INSERT.
HTH
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Guerin | 2004-06-16 14:10:29 | page x is unitialized |
Previous Message | Mike G | 2004-06-15 04:34:56 | Re: Primary Key |