SQL Server - How to use indexer in sql server 2 008

Asked By bhanupratap singh on 23-Feb-13 12:47 AM
how to use Indexer in Sql Server 2008.
How to catch exact record quickly. 
Supose Reocrd are like this

Name       Salary
--------   ------
A N SINGH 5000
B N SINGH 2000
R S SHARMA 15000
RAAJA RAM 7000

I want to the result like
Select *from table where salary>5000 and salary<7000.

If I make an index the squence salary would be 
2000
5000
7000
15000
there are two records 5000 and 7000 matching to select command. how to catch these row nos.
thanks
Jatin Trikha replied to bhanupratap singh on 26-Feb-13 05:41 AM
Read section How to Index in the link http://www.componentworkshop.com/blog/2009/06/26/sql-server-basics-understanding-indexes


You can also refer http://blog.sqlauthority.com/2010/05/12/sql-server-understanding-alter-index-all-rebuild-with-disabled-clustered-index/


hope it helps