Thread: AUTOINCREMENT--help

AUTOINCREMENT--help

From
"Macky"
Date:
Is there a function in SQL that does autoincrementing...

eg.

CREATE TABLE (name varchar(40),num_id int);

wherein num_id starts with 0 and then when ever I INSERT another record
num_id goes 1 etc....

Thanks in advance............



Re: AUTOINCREMENT--help

From
"Brett W. McCoy"
Date:
On Tue, 2 Jan 2001, Macky wrote:

> Is there a function in SQL that does autoincrementing...

http://www.postgresql.org/docs/faq-english.html#4.16.1

and

http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-createsequence.htm

will tell you how to do this.

-- Brett                                    http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
A thing is not necessarily true because a man dies for it.    -- Oscar Wilde, "The Portrait of Mr. W.H."