By using Indexes DBE can able to identify data at a faster way or searching will become faster.
1) clustered Index
2) Non-clustered Index
Difference between Clustered and Non-clustered index:
Clustered:-> Only one clustered index is allowed per table
-> Data is stored in leaf pages
Consider the below table,
-> Here will get to know the 80th employee details using B-Tree is as shown below..
-> We can create any number of non-clustered indexes per table
-> In case on non-clustered indexes leaf pages contains pointers to actual rows.
-> By default clustered index will be created when you create a primary key constraint.
-> It is always better to create Indexes on the tables which is subjected to very less modifications(or) data updations.
For clustered Index:
create clustered index on
For Non-clustered Index:
create non-clustered index on