开发者

Remove Primary Key constraint from a column

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜