declare
v_eage emp.eage%type;
cursor emp_cur
is
select eage from emp for update;
begin
open emp_cur;
loop
fetch emp_cur into v_eage;
exit when emp_cur%notfound;
if v_eage=50 then
update emp set esal=esal+200 where current of emp_cur;
else
update emp set esal=esal+300 wher current of emp_cur;
end if;
end loop;
close emp_cur;
end;为什么上述代码会报SQL命令未正确结束啊?
v_eage emp.eage%type;
cursor emp_cur
is
select eage from emp for update;
begin
open emp_cur;
loop
fetch emp_cur into v_eage;
exit when emp_cur%notfound;
if v_eage=50 then
update emp set esal=esal+200 where current of emp_cur;
else
update emp set esal=esal+300 wher current of emp_cur;
end if;
end loop;
close emp_cur;
end;为什么上述代码会报SQL命令未正确结束啊?
解决方案 »
- ORACLE如何跟踪应用程序的SQL语句
- sql优化!
- 在oracle中如何使用DBA身份进行逻辑备份
- 求教一个关于优化数据库表中数据的问题!高手请进!!急等。
- 安装OracleHome92(客户端)时出现错误:"数据库无法加载".
- 请教:数据库,实例,应用,数据库名,实例名,应用名,通用服务名,net service name 之间的关系及名词解释
- oracle用户
- 请问有谁知道toad的注册码码?
- 如何解决SQL SERVER下的临时表在Oracle下实现
- ORA-01735: 无效的 ALTER TABLE 选项(Oracle SQL )
- oracle 可有像SQLSERVER的#临时表功能的方法
- 从oracle中导出数据时,数据量很大,到几千万条记录,请问高手们,有没有什么工具可以把数据导成文本啊??
v_eage emp.eage%type;
cursor emp_cur
is
select eage from emp for update;
begin
open emp_cur;
loop
fetch emp_cur into v_eage;
exit when emp_cur%notfound;
if v_eage=50 then
update emp set esal=esal+200 where current of emp_cur;
else
update emp set esal=esal+300 wher current of emp_cur;
end if;
end loop;
close emp_cur;
end;