根据输入的编号获取某学员的成绩--if
declare
score user_tb1.score%type;
begin
select score int score from user_tb1 where id='&id';
if score>90 then
dbms_output.put_line('优秀');
...
...
end if;
end;
请各位翻译一下,就是给在后面添一下注释,刚学,看不懂
declare
score user_tb1.score%type;
begin
select score int score from user_tb1 where id='&id';
if score>90 then
dbms_output.put_line('优秀');
...
...
end if;
end;
请各位翻译一下,就是给在后面添一下注释,刚学,看不懂
解决方案 »
- PL/SQL一个判断报错问题
- PLSQL Developer 执行语句
- 表空间的一个小问题
- 服务器重启后,oracle出现的奇怪问题!在线等!
- 集中式数据库系统改造分布式系统:一,方案oracle RAC 二。oracle分布式数据库系统
- 怎么查看本机上有几个数据库啊
- 求教:windows server 2003下如何安装oracle816或oracle9i
- 我想备份数据库,出现如下错误,不知道如何解决啊?
- 难道就没有高手了吗?版主大哥去哪了啊!小弟在次跪求各位帮帮忙!!最后30救命分
- 大家都进来看看,在oracle8i中创建表时候,出现了一个很奇怪的问题。
- 为什么给用户授权了还是不能访问?
- win7装Oracle 9i遇到jrew.exe已停止工作,用C#+Oracle开发人事管理信息系统
declare
score user_tb1.score%type;--socre为变量,不过一般此处变量用v_开头比较规范,类型与表user_tb1.score列的类型相同
begin
select score int score from user_tb1 where id='&id';--不是int是into,此处给变量score赋值,取自表user_tb1中id为你给替换变量&id的值记录对应的score
if score>90 then--当结果大于90,输出优秀,显示在屏幕上
dbms_output.put_line('优秀');--调用dbms_output函数显示结果,需set serveroutput on先
...
...
end if;
end;
i number(4):=1;
begin
while i<=10 loop
dbms_output_put_line('while loop size='||i);
i:=i+1;
end loop;
end;
麻烦再给注释一下