What're Indexes in SQL Server?
Indexes are used to retrieve data from the database more quickly. The users cannot see the indexes, they are just used to speed up searches/queries.
Clustered Index Vs non-clustered Index
Clustered index: determine the physical order of data.
The table can have only one Cluster index, and Cluster Index can be one-column or two-column
Note: If you add a primary key for a table its automatically becomes a clustered index.
Non clustered indexes: have a structure separate from the data rows.
A non clustered index contains the non clustered index key values and each key-value entry has a pointer to the data row that contains the key value.
Note You can create many nonclustered indexes
To Create Nonclustered for the salary table, you can use this query:
Create Nonclustered Index IX_TableName_Salary
on TableName (Salary)
For more details, you can also see Clustered and Nonclustered Indexes