Chapter 10

A1:
create or replace view mailing_list as 
select decode(gender,‘M’,‘Mr.’,‘F’,‘Ms.’)||first_name||’‘||last_name name, street, 
city, state 
from employee; 
A2:
create or replace view employee_wages as 
select fk_department, last_name, first_name, city, wages 
from employee 
where fk_department = ‘WEL’ 
with check option; 
update employee_wages set fk_department = ‘INT’ 
where city = ‘PLAINS’; 

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.