create or replace procedure p_test as begin if 1>0 then dbms_output.put_line('1'); end if; end; /
C:\Documents and Settings\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 7 09:40:35 2011Copyright (c) 1982, 2005, Oracle. All rights reserved.idle> conn scott/bee56915 已连接。 scott@TBWORA> create or replace procedure p_test 2 as 3 begin 4 if 1>0 then 5 dbms_output.put_line('1'); 6 end if; 7 end; 8 /过程已创建。scott@TBWORA> set feedback on; scott@TBWORA> exec p_test; 1PL/SQL 过程已成功完成。
as
begin
if 1>0 then
dbms_output.put_line('1');
end if;
end;
/
已连接。
scott@TBWORA> create or replace procedure p_test
2 as
3 begin
4 if 1>0 then
5 dbms_output.put_line('1');
6 end if;
7 end;
8 /过程已创建。scott@TBWORA> set feedback on;
scott@TBWORA> exec p_test;
1PL/SQL 过程已成功完成。
dbms_output.put('1');
并没有错
dbms_output.put('1'); is ok!