Returns information about a particular ODBC datatype or about all ODBC datatypes.
sp_datatype_info [data_type]
is the code number for the specified ODBC datatype about which information is returned. Datatype codes are listed in Table 2-2 and Table 2-3.
The results set for sp_datatype_info is:
Column |
Datatype |
Description |
---|---|---|
type_name |
varchar(30) |
A DBMS-dependent datatype name (the same as the type_name column in the sp_columns results set). |
data_type |
smallint |
A code for the ODBC type to which all columns of this type are mapped. |
precision |
int |
The maximum precision for the datatype on the data source. Zero is returned for datatypes where precision is not applicable. |
literal_prefix |
varchar(32) |
Character(s) used to prefix a literal. For example, a single quotation mark (') for character types and 0x for binary. |
literal_suffix |
varchar(32) |
Character(s) used to terminate a literal. For example, a single quotation mark (') for character types and nothing for binary. |
create_params |
varchar(32) |
A description of the creation parameters for this datatype. |
nullable |
smallint |
The value 1 means this datatype can be created allowing null values; 0 means it cannot. |
case_sensitive |
smallint |
The value 1 means all columns of this type are case sensitive (for collations); 0 means they are not. |
searchable |
smallint |
The value 1 means columns of this type can be used in a where clause. |
unsigned_attribute |
smallint |
The value 1 means the datatype is unsigned; 0 means the datatype is signed. |
money |
smallint |
The value 1 means it is a money datatype; 0 means it is not. |
auto_increment |
smallint |
The value 1 means the datatype is automatically incremented; 0 means it is not. |
local_type_name |
varchar(128) |
Localized version of the data source dependent name of the datatype. |
Any user can execute sp_datatype_info.
Copyright © 2005. Sybase Inc. All rights reserved. |