Answer to Question #190034 in Databases | SQL | Oracle | MS Access for jainab

Question #190034

Write a PL/SQL code to print all tables up to a number fetched from a table using implicit cursors.


1
Expert's answer
2021-05-08T05:01:47-0400
DECLARE
    stud_first_name VARCHAR2(35);
    stud_last_name  VARCHAR2(35);
	college_id NUMBER:=&stud_id;
BEGIN
    SELECT first_name,
           last_name
    INTO   stud_first_name, stud_last_name
    FROM   student
    WHERE  stud_id = college_id;

    dbms_output.Put_line ('Student Name: '|| stud_first_name ||' '||stud_last_name);
EXCEPTION
    WHEN no_data_found THEN
      dbms_output.Put_line ('There is no employee with the ID '||to_char(college_id));
END;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS