SQL Flow Field Guide

Precision, scale, & length

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

Set decimal precision, scale, or string length before arithmetic or storage.

Calculate the widest intermediate result and test its boundary values before choosing a column type.

Check your work Arithmetic derives a result precision and scale that can differ from both inputs.

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