Returns information about a particular datatype or all supported datatypes.
sp_datatype_info [data_type]
is the ODBC code number for the specified datatype for which sp_datatype_info returns information. See Table 11-1 for a description of these codes.
The data_type parameter specifies the ODBC datatype for which information is requested. If this parameter 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. For configuration information, see “DatatypeInfo”. 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 T-SQL datatype that best matches each ODBC datatype that the target represents.
sp_datatype_info returns a list of datatypes with information about each. Results are ordered by the following columns:
DATA_TYPE
TYPE_NAME
The lengths for varchar columns shown in the result set tables are maximums; the actual lengths depend on the target database.
The following table shows the result set.
Copyright © 2005. Sybase Inc. All rights reserved. |