Mega Code Archive

 
Categories / Oracle PLSQL / System Tables Views
 

Get owner, table name and table space name from dba_tables

SQL> SQL> select owner, table_name, tablespace_name   2        from dba_tables   3       where owner in ('SCOTT', 'HR')   4       order by owner, tablespace_name, table_name; OWNER                          TABLE_NAME                     TABLESPACE_NAME ------------------------------ ------------------------------ ---------------- HR                             DEPARTMENTS                    USERS HR                             EMPLOYEES                      USERS HR                             JOBS                           USERS HR                             JOB_HISTORY                    USERS HR                             LOCATIONS                      USERS HR                             REGIONS                        USERS HR                             COUNTRIES 7 rows selected. SQL>