--最简单的过程块结构
--没有声明和异常处理,只有个执行部分
Connected as scott@ORCL
SQL>
SQL> --最简单的块结构
SQL> begin
2 dbms_output.put_line('hello,world');
3 end;
4 /
上面预期出现的结果就是输出hello,world
PL/SQL procedure successfully completed
如果没有出现预期结果 就要设置serverout 就像下面的那样 set serverout on;
我的是Oracle 11g 普通用户Scott登进去后默认的状态时 set serverout off;
所以你得设置下才可以的
===================================
SQL> set serverout on;
SQL>
SQL> --最简单的块结构
SQL> begin
2 dbms_output.put_line('hello,world');
3 end;
4 /
hello,world
PL/SQL procedure successfully completed
======================================
以上部分就是过程最简单的块,有需要的小白可以看看
.