Monday, February 8, 2010

SQL BETWEEN - Introduction and syntax

Explain the SQL BETWEEN statement. Write SQL syntax for the SQL BETWEEN statement along with an example.

SQL BETWEEN: The BETWEEN operator is used in a WHERE clause to select a range of data between two values. The values can be numbers, text, or dates.

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

No comments:

Post a Comment