You can view all the tables, views, and specific columns that are accessible to the current account by using the USER_TAB_COLS view.

Note The USER_TAB_COLS view provides the same information as the USER_TAB_COLUMNS view.
  • You can query USER_TAB_COLS views of only PolarDB clusters of version 1.1.7 or later. For more information about how to view the edition of a PolarDB cluster, see Release notes.
  • You can query USER_TAB_COLUMNS views of PolarDB clusters of version 1.1.7 or earlier. For more information about USER_TAB_COLUMNS views, see USER_TAB_COLUMNS.
Parameter Type Description
schema_name CHARACTER VARYING The name of the schema to which the table or the view belongs.
table_name CHARACTER VARYING The name of the table or view.
column_name CHARACTER VARYING The name of the column.
data_type CHARACTER VARYING The data type of the column.
data_length NUMERIC The maximum length of data in a column. Unit: characters.
data_precision NUMERIC The precision of NUMBER columns. The precision is measured by the number of digits.
data_scale NUMERIC The scale of NUMBER columns.
nullable CHARACTER(1) Specifies whether the column can have a null value. Valid values:
  • Y: indicates that the column can be null.
  • N: indicates that the column cannot be null.
column_id NUMERIC The relative position of the column within the table or view.
data_default CHARACTER VARYING The default value for the column.