扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:佚名 来源:Oracle技术网 2007年10月22日
关键字: ORACLE
在本页阅读全文(共4页)
1 create or replace function myfunc 2 return varchar2 3 as 4 begin 5 $if $$ppval $then 6 return 'PPVAL was TRUE'; 7 $else 8 return 'PPVAL was FALSE'; 9 $end 10* end; |
SQL> alter session set plsql_ccflags = 'PPVAL:TRUE'; Session altered. |
SQL> alter function myfunc compile; Function altered. SQL> select myfunc from dual; MYFUNC ------------------------------------- PPVAL was TRUE |
SQL> alter session set plsql_ccflags = 'PPVAL:FALSE'; Session altered. SQL> select myfunc from dual; MYFUNC --------------------------------------------------------- PPVAL was TRUE |
Function altered. SQL> select myfunc from dual; MYFUNC --------------------------------------------------- PPVAL was FALSE |
alter function calculate_interest compile plsql_ccflags = 'ACTIVE_STATUS_ONLY:TRUE' reuse settings; alter function apply_interest compile plsql_ccflags = FOREIGN_ACCOUNTS:TRUE' reuse settings; |
create or replace package debug_pkg is debug_flag constant boolean := FALSE; end; |
create or replace procedure myproc as begin $if debug_pkg.debug_flag $then dbms_output.put_line ('Debug=T'); $else dbms_output.put_line ('Debug=F'); $end end; |
SQL> exec myproc Debug=F |
create or replace package debug_pkg is debug_flag constant boolean := TRUE; end; |
SQL> exec myproc Debug=T |
ERROR at line 1: ORA-20000:ORU-10027:buffer overflow, limit of 1000000 bytes ORA-06512:at "SYS.DBMS_OUTPUT", line 32 ORA-06512:at "SYS.DBMS_OUTPUT", line 97 ORA-06512:at "SYS.DBMS_OUTPUT", line 112 ORA-06512:at line 2 |
SQL> show serveroutput serveroutput ON size 2000 format WORD_WRAPPED |
SQL> show serveroutput serveroutput ON SIZE UNLIMITED FORMAT WORD_WRAPPED |
ERROR at line 1: ORA-20000:ORU-10028:line length overflow, limit of 255 chars per line ORA-06512:at "SYS.DBMS_OUTPUT", line 35 ORA-06512:at "SYS.DBMS_OUTPUT", line 115 ORA-06512:at line 2 |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者