Database Procedure Example
The following database procedure accepts as input an employee ID number. The employee matching that ID is moved from the employee table and added to the emptrans table.
CREATE PROCEDURE move_emp
(id INTEGER NOT NULL) AS
BEGIN
INSERT INTO emptrans
SELECT * FROM employee
WHERE id = :id;
DELETE FROM employee
WHERE id = :id;
END;
Last modified date: 04/03/2024