CREATE OR REPLACE Package emp_pkg AS
 procedure add_emp(emp_record emp%rowtype);
 function get_info(eno emp.empno%type) return emp%rowtype;
 end;create or replace package body emp_pkg is
 procedure add_emp(emp_record emp%rowtype) is
   e_2291 EXCEPTION;
   PRAGMA EXCEPTION_INIT(e_2291,-2291);
   begin
     insert into emp values emp_record;
     EXCEPTION
       WHEN DUP_VAL_ON_INDEX THEN
         RAISE_APPLICATION_ERROR(-20010,'雇员名不能重复');
       WHEN e_2291 THEN
         RAISE_APPLICATION_ERROE(-20011,'部门不存在');
         end;
     end;     FUNCTION get_info(eno emp.empno%type) return emp%rowtype --代码错在这行但就是不知道哪里错了       is
       emp_record emp%rowtype;
       begin
         select * into emp_record from emp where empno=eno;
         return emp_record;
         exception
           when NO_DATA_FOUND THEN
             RAISE_APPLICATION_ERROR(-20012,'雇员不存在');
         end;
         
  end emp_pkg;