Updated on 2023-04-14 GMT+08:00

ALL_TAB_COLUMNS

ALL_TAB_COLUMNS displays description of columns of the tables and views that the current user can access.

Table 1 ALL_TAB_COLUMNS columns

Name

Type

Description

owner

character varying(64)

Owner of a table/view

table_name

character varying(64)

Table/View name

column_name

character varying(64)

Column name

data_type

character varying(128)

Data type of a column

column_id

integer

Column ID generated when an object is created or a column is added

data_length

integer

Length of the column, in bytes

avg_col_len

numeric

Average length of a column, in bytes

nullable

bpchar

Whether the column can be empty. For the primary key constraint and non-null constraint, the value is n.

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.

char_length

numeric

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

schema

character varying(64)

Namespace that contains the table or view.

kind

text

Type of the current record. If the column belongs to a table, the value of this column is table. If the column belongs to a view, the value of this column is view.