Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( Marks: 1 4 ) Question 5 Consider the following PL / SQL query: SET ServerOutputs on DECLARING doctor _ name varchar 2 ( 5

(Marks: 14)
Question 5
Consider the following PL/SQL query:
SET ServerOutputs on
DECLARING
doctor_name varchar2(50);
CURSER c1 IS SELECT d.firstname 1|''| d.surname DOCTOR
FROM doctor d, medicine m, prescription p
where d.doctorid =p.doctorid
and m.medid =p.medid
and p.quantity =1;
BEGIN
OPEN C1;
LOOP
FETCH cur1 INTO doctor_name;
EXIT WHEN 1% NOTFOUND;
dbms_output.put_line('DOCTOR: '+d_name );
END;
END;
Q.5.1 The code above has seven (7) errors. Identify the errors and rewrite the code so
(14)
that it would produce a valid output.
image text in transcribed

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_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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

give an example of inverse lfsr

Answered: 1 week ago

Question

Understanding Group Leadership Culture and Group Leadership

Answered: 1 week ago