Declaring exceptions - user-defined exceptions, PL-SQL Programming

Assignment Help:

Declaring Exceptions

The Exceptions can be declared only in the declarative part of the PL/SQL subprogram, block, or package. By introducing its name, you can declare an exception followed by the keyword EXCEPTION. In the illustration below, you declare an exception named past_due:

DECLARE

past_due EXCEPTION;

The Exception and variable declarations are alike. But keep in mind that, an exception is an error condition, not a data item. Unlike variables, the exceptions cannot appear in the assignment statements or the SQL statements. Though, the same scope rules apply to the variables and exceptions.


Related Discussions:- Declaring exceptions - user-defined exceptions

Keyword & parameter description - exception_init pragma, Keyword & Paramete...

Keyword & Parameter Description: PRAGMA: These keywords signify that the statement is a pragma (i.e. compiler directive). The Pragmas are processed at the compile time, n

Dbms, DBMS: The answer to this question is of course given in of the t...

DBMS: The answer to this question is of course given in of the theory book. This book is concerned with SQL DBMSs and SQL databases in particular. Soon we will be looking a

Literals in pl/sql, Literals A literal is an explicit numeric, string...

Literals A literal is an explicit numeric, string, character, or Boolean value not represented by an identifier. Numeric literal 147 and the Boolean literal FALSE are some of

Relational algebra, Define basic operators of relational algebra with an ex...

Define basic operators of relational algebra with an example each

How pl/sql resolves the calls? , How Calls Are Resolved? The figure sho...

How Calls Are Resolved? The figure shows that how the PL/SQL compiler resolves the subprogram calls. When the compiler encounters the procedure or function call, it tries to di

Name resolution-naming conventions, Name Resolution In potentially uncer...

Name Resolution In potentially uncertain SQL statements, the names of the database columns take precedence over the names of the local variables and formal parameters. For e.g.

Why use cursor variables, Why Use Cursor Variables ? Primarily, you use...

Why Use Cursor Variables ? Primarily, you use the cursor variables to pass the query result sets between the PL/SQL stored subprograms and different clients. Neither PL/SQL nor

Creating Views, Create a view named CustomerAddresses that shows the shippi...

Create a view named CustomerAddresses that shows the shipping and billing addresses for each customer in the MyGuitarShop database. This view should return these columns from the

Implement a new discount for return shoppers, Brewbean's is implementing a ...

Brewbean's is implementing a new discount for return shoppers - every fifth completed order receives a 10% discount. The count of orders for a shopper is placed in a packaged varia

Merge two data sources to sql azure database, Project Description: I hav...

Project Description: I have two types of data sources. One that is a list in SharePoint and another that is an access desktop database. The access desktop database is fairly com

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd