Oracle PL/SQL/System Tables Views/all objects — различия между версиями

Материал из SQL эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 10:01, 26 мая 2010

ALL_OBJECTS view combines all types of Oracle structures into one view.

  
SQL> select owner, object_name, object_type, temporary
  2     from all_objects
  3     where owner in ("HR","JANICE");
OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             REGIONS
TABLE               N
HR                             REG_ID_PK
INDEX               N
HR                             COUNTRIES
TABLE               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             COUNTRY_C_ID_PK
INDEX               N
HR                             LOCATIONS
TABLE               N
HR                             LOC_ID_PK
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             LOCATIONS_SEQ
SEQUENCE            N
HR                             DEPARTMENTS
TABLE               N
HR                             DEPT_ID_PK
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             DEPARTMENTS_SEQ
SEQUENCE            N
HR                             JOBS
TABLE               N
HR                             JOB_ID_PK
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             EMPLOYEES
TABLE               N
HR                             EMP_EMAIL_UK
INDEX               N
HR                             EMP_EMP_ID_PK
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             EMPLOYEES_SEQ
SEQUENCE            N
HR                             JOB_HISTORY
TABLE               N
HR                             JHIST_EMP_ID_ST_DATE_PK
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             EMP_DETAILS_VIEW
VIEW                N
HR                             EMP_DEPARTMENT_IX
INDEX               N
HR                             EMP_JOB_IX
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             EMP_MANAGER_IX
INDEX               N
HR                             EMP_NAME_IX
INDEX               N
HR                             DEPT_LOCATION_IX
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             JHIST_JOB_IX
INDEX               N
HR                             JHIST_EMPLOYEE_IX
INDEX               N
HR                             JHIST_DEPARTMENT_IX
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             LOC_CITY_IX
INDEX               N
HR                             LOC_STATE_PROVINCE_IX
INDEX               N
HR                             LOC_COUNTRY_IX
INDEX               N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             SECURE_DML
PROCEDURE           N
HR                             SECURE_EMPLOYEES
TRIGGER             N
HR                             ADD_JOB_HISTORY
PROCEDURE           N

OWNER                          OBJECT_NAME
------------------------------ ------------------------------
OBJECT_TYPE         T
------------------- -
HR                             UPDATE_JOB_HISTORY
TRIGGER             N

34 rows selected.
SQL>
SQL>



query all_objects table and subtract object_name

  
SQL>
SQL>
SQL> select substr(object_name,1,2)
  2    from all_objects t1
  3   where rownum = 1
  4  /
SU
--
IC
SQL>
SQL>