Examine the code and state which of the following options is correct? CREATE OR REPLACE PACKAGE bonus IS g_max_bonus NUMBER := .99; FUNCTION calc_bonus (p_emp_id NUMBER) RETURN NUMBER; FUNCTION calc_salary (p_emp_id NUMBER) RETURN NUMBER; END; / CREATE OR REPLACE PACKAGE BODY bonus IS v_salary employees.salary%TYPE; v_bonus employees.commission_pct%TYPE; FUNCTION calc_bonus (p_emp_id NUMBER) RETURN NUMBER - 7 - IS BEGIN SELECT salary, commission_pct INTO v_salary, v_bonus FROM employees WHERE employee_id = p_emp_id; RETURN v_bonus * v_salary; END calc_bonus FUNCTION calc_salary (p_emp_id NUMBER) RETURN NUMBER IS BEGIN SELECT salary, commission_pct INTO v_salary, v_bonus FROM employees WHERE employees RETURN v_bonus * v_salary + v_salary; END cacl_salary; END
Reveal answer
Fill a bubble to check yourself
Keep practicing — related questions
- Examine the code given below: SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 W...
- Examine the code given below: SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 W...
- Examine the given code:SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 Which of...
- Examine this code: CREATE OR REPLACE STORED FUNCTION get_sal (p_raise_amt NUMBER, p_employee_id employees.e...
- Given a function CALCTAX : CREATE OR REPLACE FUNCTION calc tax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (...
- Given a function CALCTAX : CREATE OR REPLACE FUNCTION calc tax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (...
- Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP ...
- There is a table called Employee having columns are empno, ename , job , deptno,grade and salary. Which of ...