输入id 输出name
Create procedure p1
(
p_id in int,
p_name out tbl1.name%type
)
as
begin
select name into p_name from tbl1 where id=p_id;
dbms_output.put_line(p_name);
end;
declare
p_name tbl1.name%type;
begin
p1(9,p_name);
end;
建议你看一个ORACLE的SP的例子 问题自然迎刃而解。