Employees
我正在尝试使用以下过程将值插入表中。我收到错误。谁能向我解释这个问题?错误代码:第 29 行:忽略 SQL 语句。
CREATE OR REPLACE PROCEDURE insert_employee(
p_emp_id IN NUMBER,
p_emp_fname IN VARCHAR2,
p_emp_sname IN VARCHAR2,
p_emp_add1 IN VARCHAR2,
p_emp_add2 IN VARCHAR2,
p_emp_town IN VARCHAR2,
p_emp_county IN VARCHAR2,
p_emp_telno IN NUMBER,
p_emp_position IN VARCHAR2,
p_emp_manager IN VARCHAR2
) IS
v_county_id County.county_id%type;
v_position_id Positions.position_id%type;
v_manager_id Facilities.facilty_id%type;
BEGIN
SELECT county_id
INTO v_county_id
FROM County WHERE county_name = p_emp_county;
SELECT position_id
INTO v_position_id
FROM Positions WHERE position_name = p_emp_position;
SELECT facility_manager
INTO v_manager_id
FROM Facilities WHERE facility_name = p_emp_manager;
INSERT INTO Employees (emp_id, emp_fname, emp_sname, emp_add1, emp_add2, emp_town, emp_county, emp_telno, emp_position, emp_salary, emp_manager)
VALUES(p_emp_id, p_emp_fname, p_emp_sname, p_emp_add1, p_emp_add2, p_emp_town, v_county_id, p_emp_telno, v_position_id, p_emp_salary, v_manager_id);
END;
/