AM
> To: [EMAIL PROTECTED]
> Subject: Initializing primary key values for existing table
>
>
> I needed to add a new, autoincrementing, primary key column
> to a table and have been struggling to figure out how to
> assign an initial, unique value to each row.
>
> I final
# [EMAIL PROTECTED] / 2003-06-25 02:11:05 -0400:
> I needed to add a new, autoincrementing, primary key column
> to a table and have been struggling to figure out how to
> assign an initial, unique value to each row.
>
> I finally accomplished my task, but feel sure there's an
> easier way.
>
I needed to add a new, autoincrementing, primary key column
to a table and have been struggling to figure out how to
assign an initial, unique value to each row.
I finally accomplished my task, but feel sure there's an
easier way.
Here is my solution:
1. Add the column:
alter table mytable ad