开发者

Remove Primary Key constraint from a column

开发者 https://www.devze.com 2022-12-13 16:08 出处:网络
How to remove primary key constraint from column? I have table t_data_dnefrc table. In that I have AccountNbr column which is primary key. I 开发者_如何学编程want to remove Primary key constraint for

How to remove primary key constraint from column?

I have table t_data_dnefrc table. In that I have AccountNbr column which is primary key. I 开发者_如何学编程want to remove Primary key constraint for that column.


You need to drop the constraint, the name of which can be found in the Keys folder of the table in SQL Management Studio.

ALTER TABLE t_data_dnefrc
DROP CONSTRAINT constraintName;


Note: this is mysql way - check Marcus's answer for the correct answer to OP's question.

ALTER TABLE t_data_dnefrc DROP PRIMARY KEY;
0

精彩评论

暂无评论...
验证码 换一张
取 消