Search code examples
oraclenested-table

How to distingush between nested tables and table with help of Oracle metadata system tables?


I have nested table xxx_nested_table in Oracle

CREATE OR REPLACE TYPE xxx_tab AS TABLE OF VARCHAR2(30);

CREATE TABLE xxx_nested_table (id NUMBER, column_xxx xxx_tab)
       NESTED TABLE column_xxx STORE AS xxx_col_tab;

When I select record from user_objects I cannot distinguish between record with table object and record with nested table object:

select * from user_objects where object_name like '%XXX%'

OBJECT_NAME SUBOBJECT_NAME  OBJECT_ID   DATA_OBJECT_ID  OBJECT_TYPE CREATED LAST_DDL_TIME   TIMESTAMP   STATUS  TEMPORARY   GENERATED   SECONDARY
XXX_COL_TAB     54496   54496   TABLE   06.09.2011 23:49:25 06.09.2011 23:49:25 2011-09-06:23:49:25 VALID   N   N   N
XXX_NESTED_TABLE        54495   54495   TABLE   06.09.2011 23:49:25 06.09.2011 23:49:25 2011-09-06:23:49:25 VALID   N   N   N
XXX_TAB     54491       TYPE    06.09.2011 23:48:02 06.09.2011 23:48:02 2011-09-06:23:48:02 VALID   N   N   N

How to distinguish it? On what system metadata table?


Solution

  • Found

    select * from USER_NESTED_TABLES