sequence

From: Robert Morgan <robert_(at)ihug(dot)co(dot)nz>
To: postgres <pgsql-novice(at)postgresql(dot)org>
Subject: sequence
Date: 2004-05-23 21:47:17
Message-ID: 40B11BE5.30806@ihug.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Is it possible to change an existing field to a sequence?

I have a field that contains ID numbers and I want this field to
autoincrement evrytime a new row is inserted.

The existing field is int8, (this database has been imported to
Postgresql using DBTools import wizard.)
Do I need to drop the existing column and create a new one using create
sequence.....?
and then I can use the nextval() in the insert query?

thanks
Bob

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ghaverla 2004-05-23 22:38:39 phppgadmin on Debian/unstable (sort of)
Previous Message Rory Campbell-Lange 2004-05-22 19:27:25 Re: New from mssql. Help please