oracle 存储过程,输入学号,输出对应的信息,怎么修改啊??
createorreplaceproceduresel6_stu2(var_s#invarchar(10),var_snameoutstu2.sname%type,dat...
create or replace procedure sel6_stu2
( var_s# in varchar(10),
var_sname out stu2.sname%type,
date_sage out stu2.sage%type,
ch_ssex out stu2.ssex%type
)is
begin
select sname,sage,ssex into var_sname,date_sage,ch_ssex from stu2 where s#=var_s#;
end sel6_stu2;
--------
declare
var_sname stu2.sname%type;
date_sage stu2.sage%type;
ch_ssex stu2.ssex%type ;
begin
sel6_stu2('100101',var_sname,date_sage,ch_ssex);--
dbms_output.put_line( '姓名:'||var_sname||',出生日期:'||date_sage||'性别:'||ch_ssex ); --
end;
------------------
100101 这条记录存在,错误如下: 展开
( var_s# in varchar(10),
var_sname out stu2.sname%type,
date_sage out stu2.sage%type,
ch_ssex out stu2.ssex%type
)is
begin
select sname,sage,ssex into var_sname,date_sage,ch_ssex from stu2 where s#=var_s#;
end sel6_stu2;
--------
declare
var_sname stu2.sname%type;
date_sage stu2.sage%type;
ch_ssex stu2.ssex%type ;
begin
sel6_stu2('100101',var_sname,date_sage,ch_ssex);--
dbms_output.put_line( '姓名:'||var_sname||',出生日期:'||date_sage||'性别:'||ch_ssex ); --
end;
------------------
100101 这条记录存在,错误如下: 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |