Syntax

SQL Filter a Range with BETWEEN Syntax

In SQL, filter a range with between: filters values inside a range (inclusive) — WHERE price BETWEEN 10 AND 20

Quick Answer

Syntax
WHERE price BETWEEN 10 AND 20
SQLSyntax

Filter a Range with BETWEEN

Code example
WHERE price BETWEEN 10 AND 20

Filters values inside a range (inclusive).

Learn More

How to filter a range with between in SQL

  1. Open your SQL file or editor.
  2. Copy the example, then replace its sample names and values for your code.

SQL Filter a Range with BETWEEN Syntax

Use WHERE price BETWEEN 10 AND 20.

Related Syntax References

Frequently asked questions

What is the SQL syntax for filter a range with between?

Use this pattern: WHERE price BETWEEN 10 AND 20

Can I copy this SQL code example?

Yes. Use Copy code and adapt the example to your program.

Is this SQL syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify