Oracle PL/SQL/User Previliege/outline — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 09:55, 26 мая 2010
Содержание
Alter outline name
SQL>
SQL>
SQL> create or replace outline my_outline
2 for category my_category
3 on select * from all_objects
4 /
Outline created.
SQL>
SQL>
SQL> alter outline my_outline rename to plan_for_all_objects
2 /
Outline altered.
SQL>
Alter outline to change the category
SQL>
SQL> create or replace outline my_outline
2 for category my_category
3 on select * from all_objects
4 /
Outline created.
SQL>
SQL>
SQL> alter outline my_outline change category to dictionary_plans
2 /
Outline altered.
SQL> select name, category, sql_text from user_outlines
2 /
NAME CATEGORY SQL_TEXT
------------------------------ ------------------------------ --------------------------------------------------------------------------------
MY_OUTLINE DICTIONARY_PLANS select * from all_objects
OUTLINE_3 CAT_2 select * from dual A
OUTLINE_1 CAT_1 select * from dual
OUTLINE_2 CAT_2 select * from dual
MYOUTLINE MYCATEGORY select empno, ename from emp where empno > 0
SQL>
SQL>
Create an outline
SQL>
SQL> create or replace outline outline_1
2 for category CAT_1
3 on select * from dual
4 /
Outline created.
SQL>
SQL>
SQL>
Create an outline and query user_outlines table
SQL>
SQL>
SQL> create or replace outline outline_1
2 for category CAT_1
3 on select * from dual
4 /
Outline created.
SQL>
SQL> select category, name, sql_text
2 from user_outlines
3 order by category, name
4 /
CATEGORY NAME SQL_TEXT
------------------------------ ------------------------------ --------------------------------------------------------------------------------
CAT_1 OUTLINE_1 select * from dual
CAT_2 OUTLINE_2 select * from dual
CAT_2 OUTLINE_3 select * from dual A
DICTIONARY_PLANS MY_OUTLINE select * from all_objects
MYCATEGORY MYOUTLINE select empno, ename from emp where empno > 0
SQL>
SQL>