- Categories:
TO_VARIANT¶
Converts any value to a VARIANT value or NULL (if input is NULL).
Syntax¶
Arguments¶
exprAn expression of any data type.
Usage notes¶
The
TO_VARIANTfunction cannot be used directly in an INSERT statement. Instead, useINSERT INTO ... SELECT.... The Examples section shows how to do this.
Examples¶
Use TO_VARIANT and PARSE_JSON to insert VARIANT values into a table. The PARSE_JSON function returns a VARIANT value.