Reported By: Rolf Frei Reported On: 2/18/2002 For: Version 3.05 Build 1
# 1029Dropping and Adding a Primary Key in an SQL ALTER TABLE Statement Does not Work How can we change the Primary Key with a single SQL statement? I have tried the following and this results in a table without any Primary Key at all.
ALTER TABLE Discount
ADD "DeliveryID" CHARACTER(15) AT 2,
DROP PRIMARY KEY,
ADD PRIMARY KEY (Level, DeliveryID, Amount)
USER MAJOR VERSION 3
USER MINOR VERSION 0
NOBACKUP
Comments and WorkaroundsThe workaround is to use the REDEFINE keyword to redefine the primary key.
ResolutionFixed Problem on 2/18/2002 in version 3.06 build 1