Contains the name of the sql_variant property for which information is to be provided. property is varchar(128), and can be any one of the following values.

Value

Description

Base type of sql_variant returned

BaseType

SQL Server data type, such as:

bigint

binary

char

date

datetime

datetime2

datetimeoffset

decimal

float

int

money

nchar

numeric

nvarchar

real

smalldatetime

smallint

smallmoney

time

tinyint

uniqueidentifier

varbinary

varchar

sysname

NULL = Input is not valid.

Precision

Number of digits of the numeric base data type:

datetime = 23

smalldatetime = 16

float = 53

real = 24

decimal (p,s) and numeric (p,s) = p

money = 19

smallmoney = 10

bigint = 19

int = 10

smallint = 5

tinyint = 3

bit = 1

All other types = 0

int

NULL = Input is not valid.

Scale

Number of digits to the right of the decimal point of the numeric base data type:

decimal (p,s) and numeric (p,s) = s

money and smallmoney = 4

datetime = 3

all other types = 0

int

NULL = Input is not valid.

TotalBytes

Number of bytes required to hold both the metadata and data of the value. This information would be useful in checking the maximum side of data in a sql_variant column. If the value is larger than 900, index creation will fail.

int

NULL = Input is not valid.

Collation

Represents the collation of the particular sql_variant value.

sysname

NULL = Input is not valid.

MaxLength

Maximum data type length, in bytes. For example, MaxLength of nvarchar(50) is 100, MaxLength of int is 4.