SQL Flow Field Guide

Operator precedence

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

evaluation order of operators

What changes

Input
none
Output or change
none

Syntax at a glance

n/a (reference page)

Work example

An expression mixes operators and must have an unambiguous evaluation order.

Run the sample with and without parentheses. Add parentheses around business rules even when precedence is known.

Check your work Operator precedence. The grouped result differs only where the written grouping says it should.

Practice SQL

Open in SQL Flow
SELECT 2 + 3 * 4 AS StandardPrecedence, (2 + 3) * 4 AS GroupedFirst;

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