SQL Flow Field Guide

OR

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

logical OR

What changes

Input
two boolean expressions
Output or change
TRUE/FALSE/UNKNOWN

Syntax at a glance

boolean_expression OR boolean_expression

Work example

A report needs OR to define which rows satisfy a compound search condition.

Test a match, a nonmatch, and NULL. Write the expected TRUE, FALSE, or UNKNOWN result before running the filter.

Check your work OR. The rows kept by OR are exactly those whose complete condition evaluates to TRUE.

Practice SQL

Open in SQL Flow
SELECT Value FROM (VALUES (1), (2), (3)) AS Items(Value) WHERE Value = 1 OR Value = 3;

Open Microsoft Learn for full syntax, permissions, and details for your version.