Oracle列子跪求大神改错
代码有错求大神改改
declare
cursor cur_emp
is select empno,ename,sal,deptno
from emp;
BEGIN
for emp_record in cur_emp
loop
if emp_record.deptno='SALESMAN' then
update emp set sal =emp_record .sal where deptno=emp_record.deptno;
dbms.output.put_line('员工编号:'||emp_record.empno||'员工姓名'||emp_record.ename||',所在部门编号:'||emp_record.deptno||,'原工资'||emp_record.sal||',调整后工资:'||emp_record.sal);
else if emp_record.deptno='ANALYST' then
update emp set sal =emp_record .sal where deptno=emp_record.deptno;
dbms.output.put_line('员工编号:'||emp_record.empno||'员工姓名'||emp_record.ename||',所在部门编号:'||emp_record.deptno||,'原工资'||emp_record.sal||',调整后工资:'||emp_record.sal);
else if emp_record.deptno='MANAGER' then
update emp set sal =emp_record .sal where deptno=emp_record.deptno;
dbms.output.put_line('员工编号:'||emp_record.empno||'员工姓名'||emp_record.ename||',所在部门编号:'||emp_record.deptno||,'原工资'||emp_record.sal||',调整后工资:'||emp_record.sal);
else if emp_record.deptno='CLERK' then
update emp set sal =emp_record .sal where deptno=emp_record.deptno;
dbms.output.put_line('员工编号:'||emp_record.empno||'员工姓名'||emp_record.ename||',所在部门编号:'||emp_record.deptno||,'原工资'||emp_record.sal||',调整后工资:'||emp_record.sal);
else if emp_record.deptno='PRESIDENT' then
update emp set sal =emp_record .sal where deptno=emp_record.deptno;
dbms.output.put_line('员工编号:'||emp_record.empno||'员工姓名'||emp_record.ename||',所在部门编号:'||emp_record.deptno||,'原工资'||emp_record.sal||',调整后工资:'||emp_record.sal);
end if;
end loop;
end;
ORA-06550: 第 10 行, 第 145 列:
PLS-00103: 出现符号 ","在需要下列之一时:
( - + case mod
new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current max min prior sql stddev sum
variance execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<一个带有字符集说明的可带引号的字符串文字>
<一个可带引号的 SQL 字符串> purge
符号 "null"
ORA-06550: 第 13 行, 第 145 列:
PLS-00103: 出现符号 ","在需要下列之一时:
( - + case mod
new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current max min prior sql stddev sum
variance execut
ORA-06550: 第 16 行, 第 145 列:
PLS-00103: 出现符号 ","在需要下列之一时:
( - + case mod
new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current max min prior sql stddev sum
variance execut
ORA-06550: 第 19 行, 第 145 列:
PLS-00103: 出现符号 ","在需要下列之一时:
( - + case mod
new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current max min prior sql stddev sum
variance execut
ORA-06550: 第 22 行, 第 143 列:
PLS-00103: 出现符号 ","在需要下列之一时:
( - + case mod
new null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current max min prior sql stddev sum
variance execut
ORA-06550: 第 24 行, 第 10 列:
PLS-00103: 出现符号 "LOOP"在需要下列之一时:
if
相关推荐
在线考试系统完整代码,JAVA源码,供参考用,全部功能需要自己改错误
**数据库管理**: 使用Oracle作为后端数据库,Oracle是一种强大的关系型数据库管理系统,支持复杂的事务处理和数据管理。开发者需要掌握SQL语言,以及Oracle特有的数据类型和函数。4.
Oracle各版本发行时刻和特性.docx
以下是Oracle各版本的关键特性概述:1983年,Oracle V3发布,标志着Oracle数据库跨平台支持的开端,能够支持PC、小型机和主机。
PL/SQL远程备份和恢复Oracle数据库
"PL/SQL远程备份和恢复Oracle数据库,主要通过DBMS_DUMP包进行操作,备份文件存储在数据库服务器本地,不会直接复制到客户端。使用PL/SQL工具执行预定义的作业实现备份和恢复功能。"
大型数据库复习知识总结
#### 二、Oracle数据库系统- **知识点2:Oracle版本标识含义** - **Oracle10g中的“g”含义**:“g”代表“grid”,表明Oracle 10g版本引入了网格计算的概念
浙大09春学期《数据库应用程序设计》期末考试复习指导[汇编].pdf
复习时,除了理解这些基本概念和技术,还应掌握如何编写代码来实现数据库操作,如编程题中可能出现的代码编写和改错。此外,对数据库设计的原则、SQL语言的使用,以及数据库优化策略也应有所了解。


基础和管理
