Question: Consider the following PL/SQL code querying HR database for computing incentive for a given employee: DECLARE incentive v_last_name BEGIN ; END; ; SELECT salary
Consider the following PL/SQL code querying HR database for computing incentive for a given employee: DECLARE incentive v_last_name BEGIN ; END; ; SELECT salary 0.12, last_name INTO incentive, v_lastname FROM employees WHERE employee_id = 110; DBMS_OUTPUT.PUT_LINE('Incentive = ' || TO_CHAR(incentive)); Answer the following using appropriate PL/SQL statements. a) What should be the data type of variables 'incentive' and 'v_last_name' for above code to execute successfully? [2 marks] b) Modify the code to handle the exception by printing " No employee exists in the database" in case no rows with employee id=110 exist in the table.
Step by Step Solution
There are 3 Steps involved in it
a What should be the data type of variables incentive and vlastname for above code to execute succes... View full answer
Get step-by-step solutions from verified subject matter experts
