I have a composite primary key in my table. Question, wouldn't this be a clustered index to begin with in which case I would not need to define it as being a clustered index.
问问题
47 次
1 回答
1
Yes, the primary key will default to include a clustered index as long as there is not already a clustered index on the table, and as long as you don't explicitly specify a non-clustered index.
When you create a
PRIMARY KEY
constraint, a unique clustered index on the column or columns is automatically created if a clustered index on the table does not already exist and you do not specify a unique nonclustered index. The primary key column cannot allowNULL
values.
于 2013-07-18T20:27:40.697 回答