SQL Flow Field Guide

Arithmetic (overview)

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

none (documentation, rules or examples)

What changes

Input
none
Output or change
none

Syntax at a glance

n/a (reference page)

Work example

A calculation mixes numeric operands and needs a clear type, scale, and overflow rule.

Run the literal sample with integer and decimal inputs. Cast only when the required result type is known.

Check your work Arithmetic (overview). The result type and precision match the calculation requirement at its boundary values.

Practice SQL

Open in SQL Flow
SELECT 7 / 2 AS IntegerDivision, 7.0 / 2 AS DecimalDivision;

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