Purpose
The oceanbase.CDB_TAB_COLS view displays the column information of the tables and views in all tenants.
Note
This view was introduced in 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 the table, view, or cluster. |
| TABLE_NAME | varchar(128) | NO | The name of the 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 value of this column is NULL by default. |
| DATA_TYPE_OWNER | varchar(128) | NO | The value of this column is NULL by default. |
| 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 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 NULL values 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. Valid values: CHAR_CSNCHAR_CS |
| CHAR_COL_DECL_LENGTH | bigint(0) | NO | The value of this column is NULL by default. |
| 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. |
| 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: CHARVARCHAR2NCHARNVARCHAR2 |
| 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): CHARVARCHAR2NCHARNVARCHAR2 |
| V80_FMT_IMAGE | varchar(3) | NO | The value of this column is NULL by default. |
| DATA_UPGRADED | varchar(3) | NO | The value of this column is NULL by default. |
| 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 value of this column is NULL by default. |
| INTERNAL_COLUMN_ID | bigint(0) | NO | The value of this column is NULL by default. |
| HISTOGRAM | varchar(15) | NO | The existence and type of the histogram. Valid values: NONEFREQUENCYTOP-FREQUENCYHEIGHT BALANCEDHYBRID |
| 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 | The value of this column is NULL by default. |
| IDENTITY_COLUMN | varchar(3) | NO | The value of this column is NULL by default. |
| EVALUATION_EDITION | varchar(128) | NO | The value of this column is NULL by default. |
| UNUSABLE_BEFORE | varchar(128) | NO | The value of this column is NULL by default. |
| UNUSABLE_BEGINNING | varchar(128) | NO | The value of this column is NULL by default. |
| COLLATION | varchar(100) | NO | The value of this column is NULL by default. |
| COLLATED_COLUMN_ID | bigint(0) | NO | The value of this column is NULL by default. |