【Oracle 存储过程和存储函数】 (1) 使用和创建存储过程,第一个存储过程

创建存储过程:

1 --第一个存储过程,打印Hello World
2 create or replace procedure sayhelloworld
3 as 
4 --说明部分
5 begin 
6     dbms_output.put_line('Hello World');
7 end;
8 /

使用存储过程:

 1 --调用存储过程方法1
 2 set serveroutput on
 3 exec sayhelloworld();
 4 
 5 --调用存储过程方法2
 6 set serveroutput on
 7 begin 
 8     sayhelloworld();
 9 end;
10 /

结果:

原文地址:https://www.cnblogs.com/CPU-Easy/p/10905775.html