Q2 Given the following emp_tbl: (CLOI) 6 Marks first name Ahmad last name Salah Ali Hassan salary 10,000 9,000 ,000 empID Amira 200 300 Saeed (i) Write a P/SQL procedure that: a. Declares two variabl...
Q2 Given the following emp_tbl: (CLOI) 6 Marks first name Ahmad last name Salah Ali Hassan salary 10,000 9,000 ,000 empID Amira 200 300 Saeed (i) Write a P/SQL procedure that: a. Declares two variables of type first_name and salary columns, respectively. b. Declares a cursor that includes the first_name and salary columns. c. Fetches the values in the cursor into the declared variables. d. Prints these values in the following form: First name Salary Ahmad 10,000 Amira 9,000 7,000 Saeed Ans: (ii) Write a function that receive empiD argument and returns the salary. Ans:
Q2 Given the following emp_tbl: (CLOI) 6 Marks first name Ahmad last name Salah Ali Hassan salary 10,000 9,000 ,000 empID Amira 200 300 Saeed (i) Write a P/SQL procedure that: a. Declares two variables of type first_name and salary columns, respectively. b. Declares a cursor that includes the first_name and salary columns. c. Fetches the values in the cursor into the declared variables. d. Prints these values in the following form: First name Salary Ahmad 10,000 Amira 9,000 7,000 Saeed Ans: (ii) Write a function that receive empiD argument and returns the salary. Ans: