Subject | Re: [firebird-support] Moving primary key to another column |
---|---|
Author | Matthias Hanft |
Post date | 2012-08-05T19:22:20Z |
Matthias Hanft wrote:
but as renaming a table seems to be something you cannot do without
manipulating the system tables, I created a third table with the
name of the original table and copied the "temp" table into it.
Just the question remains: Is it possible to "move" the primary key
within an existing table? (I remember I had to do this already a
couple of times in the past few years.)
Thanks,
-Matt
>Well, since it was somewhat urgent, I did it by creating a new table,
> Is this possible within the "live" database/table, or do I have to create
> a new table with the colums needed, and do some "INSERT INTO NEWTABLE
> SELECT FROM OLDTABLE" and finally rename the new table to the old name?
but as renaming a table seems to be something you cannot do without
manipulating the system tables, I created a third table with the
name of the original table and copied the "temp" table into it.
Just the question remains: Is it possible to "move" the primary key
within an existing table? (I remember I had to do this already a
couple of times in the past few years.)
Thanks,
-Matt