SIGN UP MEMBER LOGIN:
   
ARTICLE

BETWEEN Operator in Oracle SQL Plus

Posted by Deepak Kumar Articles | Oracle February 28, 2011
The BETWEEN Operator is used in WHERE Clause and allows us to define a condition to retrieve values within a range.
Reader Level:

BETWEEN Operator

BETWEEN Operator is used in WHERE Clause to select a range of data between two values i.e. from one value to another value. The value can be number, text and dates.

Syntax:
SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2;

Example:
BETWEEN1.gif
From the given table, we want to select the value by EmpId from BA0003 to BA0007, we'll execute the following query :

SELECT * FROM EmpInfo WHERE EmpId BETWEEN 'BA0003' AND 'BA0007';

The output table will look like this :
 BETWEEN2.gif

Login to add your contents and source code to this article
This Feature is Sponsored By
post comment

Nice Article Deepak write more theory in your articles so, it become more interesting to user's.

Posted by Thomas Mapother Feb 28, 2011
COMMENT USING