Updated on 2023-10-23 GMT+08:00

DB_TAB_COLUMNS

DB_TAB_COLUMNS displays description information about columns of tables accessible to the current user. This view exists in both PG_CATALOG and SYS schema.

Table 1 DB_TAB_COLUMNS columns

Name

Type

Description

owner

character varying(64)

Table owner

table_name

character varying(64)

Table name

column_name

character varying(64)

Column name

data_type

character varying(128)

Data type of the column

data_length

integer

Length of the column, in bytes

data_precision

integer

Precision of the data type. This parameter is valid for the numeric data type and NULL for other types.

data_scale

integer

Number of decimal places. This parameter is valid for the numeric data type and 0 for other data types.

nullable

bpchar

Whether the column can be empty (n for the primary key constraint and non-null constraint)

column_id

integer

Column ID generated when the object is created or column is added

char_length

numeric

Length of the column, in characters. This parameter is valid only for the varchar, nvarchar2, bpchar, and char types.

avg_col_len

numeric

Average length of a column, in bytes

comments

text

Specifies the comment content.