User Tools

Site Tools


kurs:uebung_3
PROCEDURE P_RAISE_EXEPTION
  ( v_last_name IN varchar2,
   v_salary in Number)
  IS
  zuviele_personen exception;
BEGIN
  update employees
  set salary = v_salary
  where last_name=v_last_name;
  
  if SQL%ROWCOUNT>1 THEN
    raise zuviele_personen;
  end if;
  
EXCEPTION
    WHEN zuviele_personen THEN
        rollback ;
        dbms_output.put_line('zuviele Personen');
        raise_application_error(-20001, 'ganz furchtbar', TRUE);
END;
kurs/uebung_3.txt · Last modified: 2014/09/10 21:22 (external edit)