Databases for Windows  /   Database Blog  /   Organizer Advantage, Handy Library, SQL Tutor  /   SQL Select   /  SQL Tutor, Select Where Clouse, Between
28/05/2024

SQL SELECT, WHERE clause, BETWEEN operator


SQL SELECT, WHERE clause, BETWEEN operator

When you define the condition in the WHERE clause, you can use the BETWEEN operator. After the IN you define the list of values.

Where condition, BETWEEN operator, syntax

SELECT * FROM books WHERE cost BETWEEN ‘value1’ AND ‘value2’;

SELECT title, author FROM books WHERE author BETWEEN ‘value1’ AND ‘value2’;

SELECT statement with WHERE, BETWEEN operator, examples

SELECT title, author FROM books WHERE cost BETWEEN ’20.25’ AND ’50.00’;

Copyright © 2024 · All Rights Reserved · PrimaSoft PC