Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Written Assignment-Printing a Record Using an If 1. Set echo on2. SET SERVEROUT ON3. Set up a spool file to receive your output for submission.

Written Assignment-Printing a Record Using an If

1. Set echo on2. SET SERVEROUT ON3. Set up a spool file to receive your output for submission. I would suggest c:\CSfile\spool.txt _rec)

DECLARE a record variable (Emp_rec) using %ROWTYPE. In the BEGIN block add a select statement to read a record into the declared variable from HR.EMPLOYEES 6. Add If Statement to print record7. Add DBMS_OUTPUT lines to print EMPLOYEE_ID, FIRST_NAME, LAST_NAME, and SALARY for the selected record8. Use TO_CHAR to format the salary as $999,9999. Add a EXCEPTION block to report when no data is found10. Compile and run the procedure.11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago

Question

1. Identify the sources for this conflict.

Answered: 1 week ago