Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Altering the primary key of a Table
Sun, Feb 5 2006 7:23 PMPermanent Link

"Adam H."
Hi,

Using SQL - what would be the best way to change the primary key on a table.
(ie, the current table has a primary key of field2, and I want to change
this to field1)?

Thanks & Regards

Adam.

Sun, Feb 5 2006 7:57 PMPermanent Link

"Halim Boumedjirek"
Try this synthax:
ALTER TABLE mytable REDEFINE PRIMARY KEY ("field1")

-Halim

"Adam H." <ahairsub4@rREMOVEMEspamSTOPPER.jvxp.com> wrote in message
news:57A7D951-00F2-4A42-A1B3-DE60FD2C7A1B@news.elevatesoft.com...
> Hi,
>
> Using SQL - what would be the best way to change the primary key on a
> table.
> (ie, the current table has a primary key of field2, and I want to change
> this to field1)?
>
> Thanks & Regards
>
> Adam.
>
>

Sun, Feb 5 2006 9:28 PMPermanent Link

"Adam H."
Hi Halim,

Redefine - that's what I was looking for - thank you! I think I have
Mondayitus.

Cheers

Adam.

Image