查询成绩单中的平均成绩,如果高于75分时,显示‘平均成绩大于75分’,否则显示‘平均成绩小于75分’。
表什么的都已经建好了,我写的是:
declare
avg_score report_card%rowtype;
s_score report_card.score%type;
begin
select avg(score) into s_score from report_card;
if s_score>=75 then dbms_output.put_line('平均成绩大于75分');
elsif s_score<75 then dbms_output.put_line('平均成绩小于75分');
end if;
end;
/
显示为:
PL/SQL 过程已成功完成。
可是没有输出结果,请教是怎么回事情啊?
表什么的都已经建好了,我写的是:
declare
avg_score report_card%rowtype;
s_score report_card.score%type;
begin
select avg(score) into s_score from report_card;
if s_score>=75 then dbms_output.put_line('平均成绩大于75分');
elsif s_score<75 then dbms_output.put_line('平均成绩小于75分');
end if;
end;
/
显示为:
PL/SQL 过程已成功完成。
可是没有输出结果,请教是怎么回事情啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货