Subject Re: [IBO] Beginner needs help
Author Lucas Franzen
jasonparkersmith@... schrieb:
>
> Hi there
>
> I have set up a table and I need to rename a field which is a primary
> key.
>
> How do I do it?
>
> Thanx

Drop the table (and its dependencies) and recreate it - that's the
"easiest" and safest way.


Maybe you have success with:

1. alter table <t> add <newpkfield> <datatype> NOT NULL;
2. UPDATE TABLE <t> SET <newpkfield> = <oldpkfield>;
3. alter table <t> drop <oldpkfield>;
4. alter table <t> add constraint <constraint_name> primary key
(newpkfield);

But I would prefer dropping the table ...

Regards
Luc.