Adding ax extra column to the existing constraint [message #665676] |
Fri, 15 September 2017 00:55 |
|
Revathi.orafaq
Messages: 21 Registered: September 2017
|
Junior Member |
|
|
Hi All,
Is there any direct way to add on extra column to the existing constraint.
As of now we are drooping the existing one,and adding one more with the same name , required columns.
DROP TABLE MY_TABLE1;
CREATE TABLE MY_TABLE1
(ID INT CONSTRAINT PK PRIMARY KEY ,a INT
);
ALTER TABLE MY_TABLE1 DROP CONSTRAINT PK;
ALTER TABLE MY_TABLE1 ADD CONSTRAINT PK PRIMARY KEY(ID ,a );
Is it possible to achieve the same with in single statement ?
Thanks
Revathi.T
|
|
|
|
|