set serveroutput on
declare
v_socre number:=80;
begin
if v_socre>=80 then
dbms_output.put_line('优秀');
elsif v_socre>=60 then
dbms_output.put_line('良好');
else
dbms_output.put_line('补好');
end if;
end;
declare
v_socre number:=80;
begin
if v_socre>=80 then
dbms_output.put_line('优秀');
elsif v_socre>=60 then
dbms_output.put_line('良好');
else
dbms_output.put_line('补好');
end if;
end;
本文提供了一个使用PL/SQL进行分数判断的例子。通过设置不同的条件,程序能够根据输入的成绩输出“优秀”、“良好”或“补好”。此示例展示了如何利用IF-ELSE语句来实现简单的逻辑判断。
4482

被折叠的 条评论
为什么被折叠?



