how to create non clustered index in sql server

Smith
Smith
None
2568 Points
74 Posts

Hi,

I am working with SQL Server 2008. When I am going to create index , there is only two option index or unique key.

how to create non clustered index by create command?

Views: 8703
Total Answered: 1
Total Marked As Answer: 1
Posted On: 18-Sep-2015 00:32

Share:   fb twitter linkedin
Answers
NiceOne Team
NiceOne...
Editor
1382 Points
14 Posts
         

Hi smith,

Use NONCLUSTERED keyword to create Index.

Syntax:

CREATE NONCLUSTERED INDEX <IndexName> ON <TableName>(<fieldname>)

Example:

CREATE NONCLUSTERED INDEX IX_User_tbl_User ON tbl_User(UserID)

Posted On: 20-Sep-2015 04:33
 Log In to Chat