create table mytable (
myfield serial primary key,
myotherfield integer);
Using the SERIAL data type automatically creates the sequence and default
statements for you.
-----Original Message-----
From: Mayuresh Kadu [mailto:mayureshk@aftek.com]
Sent: Monday, October 22, 2001 2:36 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Auto Increment
hi all,
could anyone tell me how to make a primary key to AUTO INCREMENT. The
document is not exactly very explainatory about it :)
Thankx in advance ...
Mayuresh
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly