Purpose
The information_schema.COLUMNS view provides information about columns in tables.
Note
This view is introduced since OceanBase Database V1.4.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLE_CATALOG | varchar(4096) | NO | The name of the catalog to which the table containing the column belongs. The value is always def. |
| TABLE_SCHEMA | varchar(128) | NO | The name of the database to which the table containing the column belongs. |
| TABLE_NAME | varchar(256) | NO | The name of the table containing the column. |
| COLUMN_NAME | varchar(128) | NO | The name of the column. |
| ORDINAL_POSITION | bigint(20) unsigned | NO | The serial number of the column. |
| COLUMN_DEFAULT | varchar(262144) | YES | The default value of the column. |
| IS_NULLABLE | varchar(4) | NO | Indicates whether the column can be null. |
| DATA_TYPE | varchar(64) | NO | The data type of the column. |
| CHARACTER_MAXIMUM_LENGTH | bigint(20) unsigned | YES | The maximum length of the column in characters. |
| CHARACTER_OCTET_LENGTH | bigint(20) unsigned | YES | The maximum length of the column in bytes. |
| NUMERIC_PRECISION | bigint(20) unsigned | YES | The numeric precision. |
| NUMERIC_SCALE | bigint(20) unsigned | YES | The number of decimal places. |
| DATETIME_PRECISION | bigint(20) unsigned | YES | The precision of the DATETIME type. |
| CHARACTER_SET_NAME | varchar(128) | YES | The name of the character set for the column. |
| COLLATION_NAME | varchar(128) | YES | The name of the collation. |
| COLUMN_TYPE | varchar(64) | NO | The column data type. |
| COLUMN_KEY | varchar(3) | NO | Indicates whether the column is indexed or has a primary key. |
| EXTRA | varchar(4096) | NO | The additional information that is available about a given column. |
| PRIVILEGES | varchar(200) | NO | The privileges you have for the column. |
| COLUMN_COMMENT | varchar(2048) | NO | The comments. |
| GENERATION_EXPRESSION | varchar(262144) | NO | Displays the expression used to compute column values for generated columns. Empty for non-generated columns. |