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;
精彩评论