How to Work with Between Operator in SQL

In this article I am going to explain how to work with between Operator in SQL.
  • 1423

Introduction

In this article I am going to explain how to work with between Operator in SQL. Between operator is used to find data within a specific rang of value. The lower limit must be coded as first expression and upper limit must be coded as second expression. We use BETWEEN operator at the mid of these two expression.

 We use comparison  operator with WHERE clause. We use it to find the specific record into result set from table stored in database. It is used to fetch specific row or specific record based on comparison.

Example

select * from mcninvoices
where invoicetotal between 2000 AND 10000

Output

 Clipboard02.jpg


© 2018 DotNetHeaven. All rights reserved.