oceanbase.CDB_TAB_COLS_V$

2024-04-19 08:42:49  Updated

Purpose

The oceanbase.CDB_TAB_COLS_V$ view provides the column information of the table and view objects in all tenants.

Note

This view is introduced since OceanBase Database V4.0.0.

Columns

Column Type Nullable? Description
CON_ID bigint(20) NO The ID of the tenant.
OWNER varchar(128) NO The owner of a table, view, or cluster.
TABLE_NAME varchar(128) NO The name of a table, view, or cluster.
COLUMN_NAME varchar(128) NO The name of the column.
DATA_TYPE varchar(128) NO The data type of the column.
DATA_TYPE_MOD varchar(3) NO The data type modifier of the column.
DATA_TYPE_OWNER varchar(128) NO The owner of the column data type.
DATA_LENGTH BIGINT(21) NO The column length, in bytes.
DATA_PRECISION bigint(20) NO The decimal precision for the NUMBER data type and the binary precision for the FLOAT data type. The value is NULL for all other data types.
DATA_SCALE bigint(20) NO The number of digits on the right of the decimal point in a number.
NULLABLE varchar(1) NO Indicates whether null values are allowed for the column. The value indicates whether the column has NOT NULL constraints or whether the column belongs to the PRIMARY KEY.
COLUMN_ID bigint(20) NO The serial number of the created column.
DEFAULT_LENGTH bigint(20) NO The length of the default value for the column.
DATA_DEFAULT mediumtext NO The default value of the column.
NUM_DISTINCT bigint(20) NO The number of distinct values in the column.
LOW_VALUE varchar(128) NO The low value in the column.
HIGH_VALUE varchar(128) NO The high value in the column.
DENSITY BIGINT(21) NO If you can create a histogram on the COLUMN_NAME column, this column shows the selectivity of the values with zero or one occurrence in the histogram. It does not represent the selectivity of values with two or more occurrences. If COLUMN_NAME is not available on the histogram, the value of this column is 1 or NUM_DISTINCT.
NUM_NULLS bigint(20) NO The number of NULLs in the column.
NUM_BUCKETS bigint(20) NO The number of buckets in the histogram of the column.
LAST_ANALYZED date NO The date on which the column was last analyzed.
SAMPLE_SIZE bigint(20) NO The sample size used to analyze the column.
CHARACTER_SET_NAME varchar(44) NO The name of the character set.
  • CHAR_CS
  • NCHAR_CS
  • CHAR_COL_DECL_LENGTH bigint(0) NO The declared length of the column of the character type.
    GLOBAL_STATS varchar(3) NO Indicates whether statistics are collected or incrementally maintained. Valid values: YES and NO.
    USER_STATS varchar(3) NO Indicates whether the statistics are directly entered by the user. Valid values: YES and NO.
    NOTES varchar(80) NO Some additional attributes.
    AVG_COL_LEN BIGINT(21) NO The average column length, in bytes.
    CHAR_LENGTH bigint(20) NO The column length in characters. The value applies only to the following data types:
  • CHAR
  • VARCHAR2
  • NCHAR
  • NVARCHAR2
  • CHAR_USED varchar(1) NO Indicates whether the column uses BYTE length semantics (value B) or CHAR length semantics (value C), or whether the data type is none of the following (value NULL):
  • CHAR
  • VARCHAR2
  • NCHAR
  • NVARCHAR2
  • V80_FMT_IMAGE varchar(3) NO Indicates whether the column data is in V8.0 image format. Valid values: YES and NO.
    DATA_UPGRADED varchar(3) NO Indicates whether column data has been upgraded to the latest type version format (YES) or not upgraded (NO)
    HIDDEN_COLUMN varchar(3) NO Indicates whether the column is a hidden one. Valid values: YES and NO.
    VIRTUAL_COLUMN varchar(3) NO Indicates whether the column is a virtual one. Valid values: YES and NO.
    SEGMENT_COLUMN_ID bigint(0) NO The sequence number of the column in the segment.
    INTERNAL_COLUMN_ID bigint(0) NO The internal serial number of the column.
    HISTOGRAM varchar(15) NO The existence and type of the histogram. Valid values:
  • NONE
  • FREQUENCY
  • TOP-FREQUENCY
  • HEIGHT BALANCED
  • HYBRID
  • QUALIFIED_COL_NAME text NO The qualified column name.
    USER_GENERATED varchar(3) NO Indicates whether the column is a user-generated column (value YES) or a system-generated column (value NO).
    DEFAULT_ON_NULL varchar(3) NO Indicates whether the column has DEFAULT ON NULL semantics. Valid values: YES and NO.
    IDENTITY_COLUMN varchar(3) NO Indicates whether the column is an identifier column. Valid values: YES and NO.
    EVALUATION_EDITION varchar(128) NO The version of the edit object referenced in the Parse expression column.
    UNUSABLE_BEFORE varchar(128) NO The oldest version of the index that can be used as part of a query plan.
    UNUSABLE_BEGINNING varchar(128) NO The most recent version of the index that is not allowed to be used as part of a query plan.
    COLLATION varchar(100) NO The rule for sorting the column. It applies only to columns of character data types.
    COLLATED_COLUMN_ID bigint(0) NO The internal serial number of the column. This virtual column generates a collation key for the column.

    Contact Us