PL/SQL 输出格式
Posted
技术标签:
【中文标题】PL/SQL 输出格式【英文标题】:PL/SQL output formatting 【发布时间】:2020-03-25 11:24:45 【问题描述】:在输出窗口中看到
old:declare
num1 int;
begin
num1:= &enter_num1;
dbms_output.put_line(num1);
end;
new:declare
num1 int;
begin
num1:= 102;
dbms_output.put_line(num1);
end;
102
PL/SQL procedure successfully completed.
已显示,但我只想要
102
PL/SQL procedure successfully completed.
显示。任何建议.....
【问题讨论】:
【参考方案1】:在 SQL*Plus 中,是 set verify off
解决了这个问题:
这就是你所拥有的:
SQL> set serveroutput on
SQL>
SQL> declare
2 num1 int;
3 begin
4 num1 := &enter_num1;
5 dbms_output.put_line(num1);
6 end;
7 /
Enter value for enter_num1: 102
old 4: num1 := &enter_num1;
new 4: num1 := 102;
102
PL/SQL procedure successfully completed.
与set verify off
:
SQL> set verify off
SQL> /
Enter value for enter_num1: 102
102
PL/SQL procedure successfully completed.
SQL>
【讨论】:
以上是关于PL/SQL 输出格式的主要内容,如果未能解决你的问题,请参考以下文章