Explain user defined exceptions in oracle

          

Explain user defined exceptions in oracle.

<<Previous  Next>>

Oracle - Explain user defined exceptions in oracle. - Feb 07, 2010 at 14:20 PM by Shuchi Gauri

Explain user defined exceptions in oracle.  

A User-defined exception has to be defined by the programmer. User-defined exceptions are declared in the declaration section with their type as exception. They must be raised explicitly using RAISE statement, unlike pre-defined exceptions that are raised implicitly. RAISE statement can also be used to raise internal exceptions.

Exception:
DECLARE
userdefined EXCEPTION;

BEGIN
<Condition on which exception is to be raised>
RAISE userdefined;

EXCEPTION
WHEN userdefined THEN
<task to perform when exception is raised>
END;

Oracle error handling

What is Exception in Oracle?, What are the predefined oracle exceptions?, Explain user defined exceptions in oracle, How PL/SQL Exceptions Are Raised?.............

Oracle Exceptions

Define Exceptions in PL/SQL, Explain how to define and raise exceptions in PL/SQL...........

What is Pragma Init Exception in oracle?

This directs the complier to add the user defined error message to the oracle error number. It associate the user defined error message to predefined error codes..........

What is Raise_application_error in oracle?

Raise_application_error allows users to create custom error messages. Syntax:- Raise_application_error (error_number error_messages);.............

How are extents allocated to a segment?

An extent is stored some specific information. This information is stored using specific number of adjoining data blocks. A collection of extent is called as a segment stored in the same tablespace..............

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 

 
Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring