milani_lucie
asked on
Primary Key - Clustered Index - SQL Server
Hi,
I thought that when you create a primary key, clustered index is automatically created. Am i correct or wrong ? But here is what i have got:
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.
Please explain me on detail manner whether i am correct or wrong. Provide simple examples to understand it better.
I did not follow this statement: and you do not specify a unique nonclustered index => Please explain in detail with example.
Thanks
I thought that when you create a primary key, clustered index is automatically created. Am i correct or wrong ? But here is what i have got:
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.
Please explain me on detail manner whether i am correct or wrong. Provide simple examples to understand it better.
I did not follow this statement: and you do not specify a unique nonclustered index => Please explain in detail with example.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you try to create primary key with GUI you will understand it better.
HTH
Vinay