SQL Flow Field Guide

sql_variant (data type)

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

data type sql_variant

What changes

Input
none
Output or change
none

Syntax at a glance

sql_variant

Work example

Store a small set of supported scalar types in one metadata field when the type must travel with each value.

Prefer a typed table design for ordinary business data and test comparisons across variant base types.

Check your work sql_variant supports a restricted set of types and does not accept large value types such as varchar(max).

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