Reputation: 138
I have an already created index on a table, but I need to remove the unique feature.
Is there a way to make a unique index non-unique without remaking the index in Transact-SQL?
Upvotes: 0
Views: 601
Reputation: 12959
There is no ALTER INDEX option available to change uniqueness. You can drop and recreate the index with unique setting removed in a single statement like given below:
CREATE NonClustered INDEX Index_Name
ON <TableName> (Column Name/s)
WITH DROP_EXISTING = ON;
Upvotes: 2