Index in SQL
this blog, I’m explaining about Indexes in SQL
Indexes are created on columns in tables or views.
The index provides a fast way to look up data base on the
values within those columns.
Types of indexes
clustered index allowed per table physically rearranges the data in the table to confirm to the index constraints for use on columns that are frequently searched for
ranges of data for use on columns
Create TABLE [dbo].[EmployeeDetail]
ADD CONSTRAINT [PK_EmployeeDetail]
PRIMARY KEY CLUSTERED
Non Clustered Indexes
clustered Index is useful for columns that have some repeated values. A table
can have more than one
Non-clustered index. Non clustered column always depends on the clustered
column on the database.
CREATE UNIQUE NONCLUSTERED INDEX [IX_EmployeeDetail]
select * from EmployeeDetail