Question: Stored PL/SQL Procedure Implement a stored PL/SQL procedure that insert into a database full information about an employee i.e., the values of the following attributes
Stored PL/SQL Procedure Implement a stored PL/SQL procedure that insert into a database full information about an employee i.e., the values of the following attributes E#, NAME, DOB, ADDRESS, HIREDATE, L#, STATUS, EXPERIENCE (only for mechanics). Your procedure should enforce a logical consistency constraint such that "the sets of drivers and mechanics must be disjoint". It means that it is not allowed to have in the tables MECHANIC and DRIVER the rows with the same employee number (E#) and/or the same driving license number (L#). Execute your procedure twice. The first execution should insert full information about a new employee. The second execution should fail due to the violation of logical consistency constraint given above.
Step by Step Solution
There are 3 Steps involved in it
Heres an example of how you can implement such a procedure CREATE OR REPLACE PROCEDURE insertemploye... View full answer
Get step-by-step solutions from verified subject matter experts
