Thursday, 25 February 2016

RAISE_APPLICATION_ERROR

  • It is a built in procedure in oracle which is used to display the user defined error messages along with the error number whose range is in between -20000 and -20999.
  • Whenever a message is displayed using Raise_Application_Error,all previous transactions which are not committed within the PL/SQL block are rolled back automatically(i.e., change due to INSERT,UPDATE OR DELETE statements).
  • Raise_Application_Error raised exception but does not handle it.
  • Raise_Application_Error is used for the following reasons
                1.To create a unique ID for an user_defined exception.
                2.To make the user defined exception look like an Error.

 The General Syntax to use this Procedure is:
      Raise_Application_Error(Error_number,'Error_message');
  • The Error_number must be between -20000 and -20999
  • The Error_message is the message you want to display when the error occurs.It can be maximum length of 1 to 2048 characters.


No comments:

Post a Comment

If you Like my blog Spread it and help friends for whom this blog is useful for their career.