Oracle 视图 ALL_TAB_IDENTITY_COLS 官方解释,作用,如何使用详细说明

本站中文解释

ALL_TAB_IDENTITY_COLS是Oracle的系统视图,它显示当前用户可见的所有表的身份列(IDENTITY columns)信息,用户可以通过这个视图来检查表是否存在身份列,如果存在,可以查看其列类型、列名、设定的SEED和步长,以及其他一些对列属性的定义,以便获取到更多有用信息。

使用All_Tab_Identity_Cols 视图,可以通过SQL语句来实现:

SELECT OWNER, TABLE_NAME, COLUMN_NAME FROM ALL_TAB_IDENTITY_COLS WHERE OWNER = ‘SCHEMA USERNAME’;

这条语句会返回给定schema用户拥有的所有表包含了身份列(IDENTITY)的相关信息。

官方英文解释

ALL_TAB_IDENTITY_COLS describes all table identity columns.

Related Views

  • DBA_TAB_IDENTITY_COLS describes all table identity columns.

  • USER_TAB_IDENTITY_COLS describes all table identity columns. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the table

TABLE_NAME

VARCHAR2(128)

NOT NULL

Name of the table

COLUMN_NAME

VARCHAR2(128)

NOT NULL

Name of the identity column

GENERATION_TYPE

VARCHAR2(10)

Generation type of the identity column. Possible values are ALWAYS or BY DEFAULT.

SEQUENCE_NAME

VARCHAR2(128)

NOT NULL

Name of the sequence associated with the identity column

IDENTITY_OPTIONS

VARCHAR2(298)

Options for the identity column sequence generator

See Also:

  • “DBA_TAB_IDENTITY_COLS”

  • “USER_TAB_IDENTITY_COLS”

See Also:

  • The ALTER TABLE statement in Oracle Database SQL
    Language Reference
    for more information about creating an identity column

  • The CREATE TABLE statements in Oracle Database SQL
    Language Reference
    for more information about creating an identity column


数据运维技术 » Oracle 视图 ALL_TAB_IDENTITY_COLS 官方解释,作用,如何使用详细说明