[color=red][b]创建存储过程,存储过程名称:p[/b][/color]
[color=red][b]执行存储过程语句:[/b][/color]
[color=red][b]在其他plsql中调用存储过程[/b][/color]
create or replace procedure p
is
v_sal emp.sal%type;
begin
select sal into v_sal from emp where empno = 7369;
if (v_sal < 1200) then
dbms_output.put_line('low');
elsif(v_sal < 2000) then
dbms_output.put_line('middle');
else
dbms_output.put_line('high');
end if;
end;
[color=red][b]执行存储过程语句:[/b][/color]
exec p;
[color=red][b]在其他plsql中调用存储过程[/b][/color]
begin
p;
end;