SQL_VARIANT_PROPERTY
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.