Oracle SQL/PLSQL Chapter 5: Data Dictionary

Oracle SQL/PLSQL Chapter 5: Data Dictionary

Describes all objects in the database

To describe all objects in the database use the below code.

 SELECT * FROM dba_objects;

To see all the data dictionary views to which you have access

SELECT * FROM dict;

Text source of the stored objects

.USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the owner column.

SELECT * FROM user_source WHERE TYPE='TRIGGER' AND LOWER(text) LIKE '%order%';

 ALL_SOURCE describes the text source of the stored objects accessible to the current user. 

 SELECT * FROM all_source WHERE owner=:owner ;

 DBA_SOURCE describes the text source of all stored objects in the database. 

 SELECT * FROM dba_source


Get list of all tables in Oracle

 SELECT owner, table_name FROM all_tables;

ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. synonym for USER_TAB_COLUMNS.

SELECT * FROM all_tab_columns WHERE table_name = :name;

Post a Comment

0 Comments