I have a table with no index. I need to add a clustered index on one column but the table does not have any column having unique data.Will this allow me to add clustered index on a duplicate column?
问问题
6116 次
1 回答
3
A clustered index does not enforce uniqueness unless you specify the keyword UNIQUE.
CREATE CLUSTERED INDEX bob ON foo( bar )
is not the same as
CREATE UNIQUE CLUSTERED INDEX bob on foo( bar )
You may be thinking of a PRIMARY KEY constraint in a CREATE TABLE statement. In this example:
CREATE TABLE foo ( bar PRIMARY KEY )
ASE will create a UNIQUE, CLUSTERED index on bar.
于 2012-08-14T09:51:43.213 回答