declare
   v_job VARCHAR2(255);
   exceptie_user EXCEPTION;
begin
   select job
   into v_job
   from emp
   where ename='KING';
   if (v_job = 'PRESIDENT') then
     raise exceptie_user;
   end if;
exception
   when exceptie_user then
    dbms_output.put_line('KING este '||v_job);
end;
/
