User Tools

Site Tools


kurs:p_error

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:p_error [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +PROCEDURE P_ERROR
 +   ( v_last_name IN employees.last_name%TYPE)
 +   IS
 +   ​v_emp_id number(30);
 +BEGIN
 +   ​select employee_id into
 +     ​v_emp_id
 +   from
 +     ​employees
 +   where last_name = v_last_name;​
  
 +   ​dbms_output.put_line(v_emp_id);​
 +EXCEPTION
 +    WHEN no_data_found THEN
 +      dbms_output.put_line('​keine Daten'​);​
 +    WHEN too_many_rows THEN
 +      dbms_output.put_line('​zuviele Daten'​);​
 +    when others then
 +      dbms_output.put_line('​irgendein Fehler '​||SQLCODE);​
 +END; -- Procedure
 +</​code>​
kurs/p_error.txt ยท Last modified: 2014/09/10 21:22 (external edit)