29.06.2013 Views

Elemente de PL/SQL [pdf] - Baze de date

Elemente de PL/SQL [pdf] - Baze de date

Elemente de PL/SQL [pdf] - Baze de date

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EXCEPTIA CASE NOT FOUND<br />

În cazul absenţei lui ELSE se adaugă implicit ridicarea unei<br />

excepţii pre<strong>de</strong>finite:<br />

ELSE RAISE CASE_NOT_FOUND;<br />

Exemplu: domeniul pentru specializarea cu cod 21 (UMANIST)<br />

nu este printre etichetele CASE şi nu există ELSE:<br />

. . . .<br />

SELECT domeniu<br />

INTO v_dom<br />

FROM spec<br />

WHERE cods=21;<br />

CASE v_dom<br />

WHEN 'STIINTE EXACTE' THEN<br />

dbms_output.put_line('EXACTE');<br />

END CASE;<br />

. . . .<br />

va semnala excepţia: ORA-06592: CASE not found while executing<br />

CASE statement.<br />

F. Radulescu. Curs: <strong>Baze</strong> <strong>de</strong> <strong>date</strong> 38

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!