CREATE OR replace PACKAGE emp_pkg
AS
PROCEDURE find_emp1(
c_id IN employees.employee_id%TYPE);
END emp_pkg;
/
CREATE OR replace PACKAGE BODY emp_pkg
AS
PROCEDURE Find_emp1(c_id IN employees.employee_id%TYPE)
IS
v_row employees%ROWTYPE;
BEGIN
SELECT first_name,
employee_id,
hire_date
INTO v_row
FROM employees
WHERE employee_id = c_id;
dbms_output.Put_line('ID:'
|| v_row.employee_id);
dbms_output.Put_line('NAME:'
||v_row.first_name);
dbms_output.Put_line('HIRE_DATE:'
|| v_row.hire_date);
END find_emp1;
END emp_pkg;
/
答案 0 :(得分:0)
我认为您在select语句中的3个值与表中的列数之间不匹配。什么是表格列?