Introduction:
Now in this article i am going to explain How to get/select records between two values in SQL Server. suppose you
have a Employee Table with thousands of rows and you want to retrieve some of the records based on some
criteria e.g. only those records where Employee's Salary is between 10000and 15000.
Following two
different ways to achieve this:
- SELECT Salary ,
* FROM EmpTable WHERE Salary BETWEEN 10000 AND 15000 ORDER BY Salary
Or
- SELECT Salary ,
* FROM EmpTable WHERE Salary >= 10000 AND Salary <=15000 ORDER BY Salary
0 comments:
Post a Comment