Difference between RAISE and RAISE_APPLICATION_ERROR in Oracle

Error handling is an important aspect of any coding standard. In Oracle, we do that by raising an exception using RAISE or RAISE_APPLICATION_ERROR. Many experienced programmers may have used both in one way or the other. But if you are new to PL/SQL, you may wonder about the difference between the two.  It is inevitable that you understand the difference between RAISE and RAISE_APPLICATION_ERROR. So why Oracle has given two ways of raising an error instead of one? Let us find out.


RAISE_APPLICATION_ERROR is a standard built-in procedure by Oracle that raises an error with number and user understandable error message. This helps user to work on the resolution of error in most exclusive and correct way.

Raise_application_error shows application specific error message. You cannot re-raise it.

Read more about Raise_Application_Error here

For Example,

What is RAISE?

RAISE is also a standard built-in procedure by Oracle but it is mostly used to raise user-defined exception. It is also used to raise standard oracle exception. Without showing an actual message of exception, RAISE will just raise an exception and fails the execution of the code.

The advantage of RAISE is that it can be used to re-raise the same exception again.

For Example,

Oracle documentation of handling PL/SQL Errors

Hope you like the article and find it useful. We highly appreciate comments and feedback.

You can also Subscribe here to stay updated on latest posts of Oraclemine.com.

Leave a Reply

Your email address will not be published. Required fields are marked *