create procedure my_pro is
begin
  insert into test values(6,'Ivan',3800);
end;
exec my_pro;


create or replace procedure my_pro2(v_sal in number,v_name varchar2) is
begin
  update test set sal=v_sal where name=v_name;
end;
exec my_pro2(2000,'Ivan');/***参数默认in,也可以执行call my_pro2(2000,'Ivan');***/


create or replace procedure my_pro3(v_id in number,v_name out varchar2) is
begin
  select ename into v_name from test where id=v_id;
end;

 posted on 2012-08-14 10:31  Chenyong Liu  阅读(110)  评论(0)    收藏  举报