sp_datatype_info

Returns information about a particular datatype or all supported datatypes.

Syntax

sp_datatype_info [data_type]

Parameters

Usage

  • If data_type is not provided, sp_datatype_info returns information about all supported datatypes.

  • This procedure corresponds to the ODBC function SQLGetTypeInfo.

  • The DatatypeInfo property specifies whether information is returned for Transact-SQL datatypes or target database datatypes.

    If the value for data_type equals:
    • target, the sp_datatype_info returns all target datatypes and their associated ODBC datatypes. A specific ODBC datatype may be used to represent multiple target datatypes.

    • transact, the sp_datatype_info returns the Transact-SQL datatype that best matches each ODBC datatype that the target represents.

Related reference
DatatypeInfo