SQL Flow Field Guide

SQL_VARIANT_PROPERTY

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

type or identity metadata

What changes

Input
argument expression or table identity metadata
Output or change
value
Return type
sql_variant

Syntax at a glance

SQL_VARIANT_PROPERTY ( expression , property )

Work example

Inspect a base type, precision, scale, or collation in sql_variant.

Test null, overflow, precision, and metadata visibility with values that fit the target type.

Check your work Check the requested property and null result before converting to a fixed type.

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