ODBC_COLUMNS

Provides table column information.

Provides table column information. The format is defined by the ODBC standard for the ODBC SQLColumns metadata. Details on the ODBC SQLColumns format are available in the ODBC specification: http://msdn.microsoft.com/en-us/library/windows/desktop/ms711683%28v=vs.85%29.aspx.

Column Name Data Type Description
SCHEMA_NAME VARCHAR The name of the schema in which the column resides. If the column does not reside in a schema, this field is empty.
TABLE_NAME VARCHAR The name of the table in which the column resides.
COLUMN_NAME VARCHAR The name of the column.
DATA_TYPE INTEGER The data type of the column. This can be an ODBC SQL data type or a driver-specific SQL data type. This column corresponds to the ODBC_TYPE column in the TYPES table.
DATA_TYPE_NAME VARCHAR The driver-specific data type name.
COLUMN_SIZE INTEGER The ODBC-defined data size of the column.
BUFFER_LENGTH INTEGER The transfer octet length of a column is the maximum number of bytes returned to the application when data is transferred to its default C data type. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms713979%28v=vs.85%29.aspx
DECIMAL_DIGITS INTEGER The total number of significant digits to the right of the decimal point. This value has no meaning for non-decimal data types.
NUM_PREC_RADIX INTEGER The radix Vertica reports decimal_digits and columns_size as. This value is always 10, because it refers to a number of decimal digits, rather than a number of bits.
NULLABLE BOOLEAN Indicates whether the column can contain null values. Values are 0 or 1.
REMARKS VARCHAR The textual remarks for the column.
COLUMN_DEFAULT VARCHAR The default value of the column.
SQL_TYPE_ID INTEGER The SQL data type of the column.
SQL_DATETIME_SUB VARCHAR The subtype for a datetime data type. This value has no meaning for non-datetime data types.
CHAR_OCTET_LENGTH INTEGER The maximum length of a string or binary data column.
ORDINAL_POSITION INTEGER Indicates the position of the column in the table definition.
IS_NULLABLE VARCHAR Values can be YES or NO, determined by the value of the NULLABLE column.
IS_IDENTITY BOOLEAN Indicates whether the column is a sequence, for example, an auto-increment column.