I am using these tables:
- flights (flno, origin, destination, distance, departs, arrives, price)
- aircraft (aid, aname, crusingrange)
- employees (eid, ename, salary)
- certified (eid,aid)
and I need to create a trigger that displays a warning when inserting an employee with "666" anywhere in his/her name.
This is what I came up with so far; I am lost with the rest of it.
set serveroutput on
create or replace trigger emp_warning
before insert
on employees
for each row
declare
v_name;
begin
select e.ename into v_ename
from employees e