使用oracle12c做数据库的操作的时候,提示一下错误,我来贴下源码:

Create or Replace Procedure Pro_DepEmpInfo
(DepId in varchar --输入参数,部门编号)
As
Begin
  Declare cursor cur_emp IS select * from Employee where department=DepID; --  定义游标
  v_empRow Employee%Rowtype;             --定义记录变量
  Begin
    open cur_emp;             --打开游标
    loop
      fetch cur_emp into v_empRow;--提取游标当前行数据
      exit when cur_emp%notfound;--如果没有任何数据,则退出循环
      dbms_output.put_line(cur_emp%rowcount||--输出雇员信息表
      ',雇员编号:'||v_empRow.EmpNumber||
      ',雇员姓名:'||v_empRow.EmpName||
      ',性别:'||v_empRow.Sex||
      ',电话:'||v_empRow.Phone||
      ',薪水:'||v_empRow.Salary );
      end loop;
      close cur_emp;--关闭游标
      end;
End Pro_DepEmpInfo;
      提示错误:

Errors: check compiler log oracle数据库的问题

经过查询代码以及百度,说是全角半角的问题,也就是说中英文符号混合导致出错

后经发现并非此错误,而是注释错误!

Errors: check compiler log oracle数据库的问题

最后发现问题成功解决!

相关文章:

  • 2021-11-20
  • 2022-01-01
  • 2021-12-14
  • 2021-11-17
  • 2021-11-13
  • 2021-08-26
  • 2021-12-02
  • 2022-02-25
猜你喜欢
  • 2021-12-16
  • 2021-11-03
  • 2022-12-23
  • 2021-04-21
  • 2021-12-02
  • 2022-01-09
  • 2021-07-13
相关资源
相似解决方案