Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Heres how you can define and use the cursor variable EmpCurTyp in PLSQL sql Define the cursor variab... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Algorithms questions