SQL

Filtering with BETWEEN, IN, and LIKE

Learn advanced filtering techniques for ranges, lists, and patterns.

By TechCoder TeamLast updated: 2026-06-02
In a Nutshell

Learn advanced filtering techniques for ranges, lists, and patterns. This hands-on tutorial focuses on practical implementation of filtering with between, in, and like concepts.

The BETWEEN Operator

The BETWEEN operator selects values within a given range. The values can be numbers, text, or dates. The range is inclusive (begin and end values are included).

Example: Price Range

Find products with a price between 10 and 20.

SQL PLAYGROUND
⏳ Loading editor…

The IN Operator

The IN operator allows you to specify multiple values in a WHERE clause. It is a shorthand for multiple OR conditions.

Example: Specific Countries

Find customers from Germany, Mexico, or UK.

SQL PLAYGROUND
⏳ Loading editor…

The LIKE Operator

The LIKE operator is used to search for a specified pattern in a column.

  • % represents zero, one, or multiple characters.
  • _ represents a single character.

Wildcard Examples

PatternDescription
'a%'Starts with "a"
'%a'Ends with "a"
'%or%'Contains "or" anywhere
'_r%'"r" is the second character
'a__%'Starts with "a" and has at least 3 characters

Example: Starts with "A"

Find customers whose name starts with "A".

SQL PLAYGROUND
⏳ Loading editor…

Example: Contains "or"

Find customers whose name contains "or".

SQL PLAYGROUND
⏳ Loading editor…