Oracle PL/SQL/System Tables Views/USER CATALOG
Версия от 13:45, 26 мая 2010; (обсуждение)
Query dba_synonyms and user_catalog table
SQL>
SQL> SELECT ds.owner owner, table_owner,
2 SUBSTR(dc.table_type,1,6) table_type,
3 ds.table_name table_name, synonym_name
4 FROM dba_synonyms ds, user_catalog dc
5 WHERE ds.table_name = dc.table_name
6 and rownum < 50
7 ORDER BY ds.owner, table_owner, table_type, ds.table_name;
no rows selected
SQL>
USER_CATALOG view also has a synonym defined
SQL>
SQL>
SQL> -- USER_CATALOG view also has a synonym defined.
SQL>
SQL> SELECT * FROM USER_CATALOG where rownum < 10;
TABLE_NAME TABLE_TYPE
------------------------------ -----------
ACCESS$ TABLE
ALERT_QT TABLE
ALL_ALL_TABLES VIEW
ALL_APPLY VIEW
ALL_APPLY_CONFLICT_COLUMNS VIEW
ALL_APPLY_DML_HANDLERS VIEW
ALL_APPLY_ENQUEUE VIEW
ALL_APPLY_ERROR VIEW
ALL_APPLY_EXECUTE VIEW
9 rows selected.
SQL>
SQL>
SQL>