On Mon, 2005-03-14 at 10:02 +0100, PFC wrote:
> If you want to add a SERIAL field to an existing table, create a
> sequence
> and then create an integer field with default nextval(seq) and postgres
> will fill it automatically. The order in which it will fill it is not
> guaranteed tho
If you want to add a SERIAL field to an existing table, create a sequence
and then create an integer field with default nextval(seq) and postgres
will fill it automatically. The order in which it will fill it is not
guaranteed though !
However, you might also like to de-dupe your data once
r just use copy with the
column names of all columns except the column with the serial values--these
will be auto-incremented.
Sean
- Original Message -
From: "Bernard Grosperrin" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, March 08, 2005 6:25 PM
Subject: [SQL] Newbie wonder
Please, bear with me, as this is my first post here.
(1) I have a 2 table database, result of a conversion from Access. This has
been made by an amateur, as one of the tables should be at least 3 related
tables, bunch of redundant data,and the other one 2.
I know I could create a table as the res