All Type Coding

Search Here

Between Operator in sql server.


BETWEEN Operator

The SQL BETWEEN Condition is used to get values within a range

Syntax:
            SELECT *  FROM table_name
                  WHERE column_name BETWEEN value1 AND value2;

Lets consider the below data selected from Product table.
















Now we'll see how to use BETWEEN operator.
















Using Between operator we get only two records out of five records from the table.Thus the between operator  is used to select values within a range.












We can use the between operator with others operator like NOT,AND

No comments :

Post a Comment