Question: Following the example in Lecture 3, write a program to print a record from HR.EMPLOYEES. Set echo on SET SERVEROUT ON Set up a spool

Following the example in Lecture 3, write a program to print a record from HR.EMPLOYEES.

Set echo on

SET SERVEROUT ON

Set up a spool file to receive your output for submission. I would suggest c:\CS4210\wa3spool.txt .

DECLARE variables for Department_ID, Employee_ID, First_Name, Last_Name, and Salary

In the BEGIN block add a select statement to read a record into the declared variables from HR.EMPLOYEES for an Employee_ID to be determined at run time

Add DBMS_OUTPUT lines to print each variable for the select record

Add a EXCEPTION block to report when no data is found

Compile and run the procedure for the Employee, 114

Close the spool file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!