Question: Define a strong cursor variable type, name it EmpCurTyp. Its return type is employees%ROWTYPE, based on table Employees. Then declare a cursor variable of this

Define a strong cursor variable type, name it EmpCurTyp. Its return type is employees%ROWTYPE, based on table Employees. Then declare a cursor variable of this type. In your program, first you will open the cursor variable for a select statement as SELECT * FROM employees WHERE department_id = deptid ORDER BY last_name; Where deptid is a variable of data type number (4) with an initial value 20. Your program will print out the employees' employee ID and full names in this department 20. (please pay attention, the Cursor-For loop does NOT work for cursor variable) Then, open that cursor variable again, this time for the statement as below SELECT * FROM employees WHERE commission_pct >= 0.3 and salary >= 12000 ORDER BY employee_id; then print out these employees' IDs, first names, last names, their salaries and commission rates. Last, do not forget to close the cursor variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres how you can define and use the cursor variable EmpCurTyp in PLSQL sql Define the cursor variab... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!