Re: Auto Increment - Mailing list pgsql-sql

From Joe Barrero
Subject Re: Auto Increment
Date
Msg-id 4F07A1CC8DDE404CB6B84C5DE431F6E601CAFC@exchange1.Sweepsclub.com
Whole thread Raw
In response to Auto Increment  ("Mayuresh Kadu" <mayureshk@aftek.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: dropping foreign key
Next
From: san
Date:
Subject: Re: PL/pgSQL triggers ON INSERT OR UPDATE