NONCLUSTERED PRIMARY KEY : Primary Key « Constraints « SQL Server / T-SQL Tutorial






4> CREATE TABLE MyTable (
5>   MyID Int IDENTITY(1,1) NOT NULL
6>  , Description nVarChar(50) NOT NULL
7>  , Region nVarChar(10) NOT NULL DEFAULT 'PNW'
8>  , CONSTRAINT PK_ID PRIMARY KEY NONCLUSTERED (MyID))
9> GO
1>
2>
3> drop table MyTable;
4> GO








7.2.Primary Key
7.2.1.Primary Key Constraint
7.2.2.The PRIMARY KEY Clause
7.2.3.Define constraint name for primary key
7.2.4.PRIMARY KEY (cust_id)
7.2.5.You cannot add another primary key to table
7.2.6.NONCLUSTERED PRIMARY KEY
7.2.7.Using a Multicolumn Primary Key