Chapter 14

A1:
begin 
 dbms_output.put_line (‘I am soon to be a PL/SQL expert’); 
end; 
/ 
A2:
begin <<sections>> 
  goto section3; 
  <<section1>> 
  dbms_output.put_line (‘Section 1’); 
  goto section4; 
  <<section2>> 
  dbms_output.put_line (‘Section 2’); 
  goto section1; 
  <<section3>> 
  dbms_output.put_line (‘Section 3’); 
  goto section2; 
  <<section4>> 
  dbms_output.put_line (‘Section 4’); 
end b_label; 
/ 
A3:
 declare retirement_date date; emp_var employee%rowtype; begin select max(birth_date) into emp_var.birth_date from employee; select last_name, first_name into emp_var.last_name, emp_var.first_name from employee where birth_date = emp_var.birth_date; retirement_date := add_months(emp_var.birth_date, 12*65); dbms_output.put_line (emp_var.first_name||’‘||emp_var.last_name||’ ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.