SQL Flow Field Guide

float & real (data type)

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

data type float & real

What changes

Input
none
Output or change
none

Syntax at a glance

float [ ( n ) ] | real

Work example

Store scientific measurements where an approximate binary value is acceptable.

Use a tolerance for comparisons and use decimal for exact decimal business rules.

Check your work float and real are approximate, so equality checks can fail after arithmetic.

Practice SQL

Open in SQL Flow
SELECT CAST(0.1 AS float) + CAST(0.2 AS float) AS approximate_sum;

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