Database Administration Question: Download Database Administration PDF

Explain How do we handle exceptions / errors in stored procedures?

Tweet Share WhatsApp

Answer:

Exceptions can be handled in various ways in the stored procedures. Method (1) could be using EXCEPTION block in the procedure within which use WHEN <exceptionname> THEN. Method (2) could be declare a variable in DECLARE section as EXCEPTION type, raise it wherever required using RAISE <exception variable name> and handle it in EXCEPTION part using WHEN clause. Method (3) could be using the keywords SQLCODE & SQLERRM to display error no and error code..

Download Database Administration PDF Read All 25 Database Administration Questions
Previous QuestionNext Question
Explain What is ORA-1555?Explain Do a view contain data?