Documents: Some More Predefined Exceptions in Oracle

Some More Predefined Exceptions in Oracle

Rate this File
Uploaded by salmankhalid - 08-31-2009
Author Author salmankhalid
File Size File Size 131.1 KB
File Type File Type pdf
Document Downloads Downloads 3
+ Download
Summary of Predefined PL/SQL Exceptions

An internal exception is raised automatically if your PL/SQL program violates an Oracle rule or exceeds a system-dependent limit. PL/SQL predefines some common Oracle errors as exceptions. For example, PL/SQL raises the predefined exception NO_DATA_FOUND if a SELECT INTO statement returns no rows.

You can use the pragma EXCEPTION_INIT to associate exception names with other Oracle error codes that you can anticipate. To handle unexpected Oracle errors, you can use the OTHERS handler. Within this handler, you can call the functions SQLCODE and SQLERRM to return the Oracle error code and message text. Once you know the error code, you can use it with pragma EXCEPTION_INIT and write a handler specifically for that error.

PL/SQL declares predefined exceptions globally in package STANDARD. You need not declare them yourself. You can write handlers for predefined exceptions using the names in the following list:

kindly view the attachment for some Predefined Oracle Exceptions............

Comments

Sadik
08-31-2009 at 06:46 AM
Hi... just edited the article for better readability, hope you don't mind...
salmankhalid
08-31-2009 at 08:51 AM
Thanx a lot for guiding me, and i really feel very happy when the mistakes from my end are corrected by others

really thanx a lot.........
ShaheerBadar
01-10-2010 at 03:39 PM
thanks very