Predefined exceptions, PL-SQL Programming

Predefined Exceptions

The internal exception is raised implicitly whenever your PL/SQL program exceeds a system-dependent limit or violates an Oracle rule. Each & every Oracle error has a number, but exceptions should be handled by the name. Therefore the, PL/SQL predefines some general Oracle errors as exceptions. For illustration, the PL/SQL raises the predefined exception NO_DATA_FOUND when a SELECT INTO statement returns no rows.

You can use the OTHERS handler, to handle the other Oracle errors. The SQLCODE & SQLERRM functions are primarily very helpful in the OTHERS handler since they return the message text & the Oracle error code. Otherwise, you can use the pragma EXCEPTION_INIT to relate an exception names with the Oracle error codes.

The PL/SQL declares predefined exceptions globally in the package STANDARD that defines the PL/SQL atmosphere. Therefore, you need not declare them yourself. You can write the handlers for predefined exceptions using the names shown in the list below. The corresponding Oracle error codes and SQLCODE return values are also shown.

2414_predefined exceptions.png

A short description of the predefined exceptions is as shown below:

2382_predefined exceptions2.png

718_predefined exceptions1.png

Posted Date: 10/5/2012 5:09:54 AM | Location : United States

Related Discussions:- Predefined exceptions, Assignment Help, Ask Question on Predefined exceptions, Get Answer, Expert's Help, Predefined exceptions Discussions

Write discussion on Predefined exceptions
Your posts are moderated
Related Questions
On occasion, some of Brewbean's customers mistakenly leave an item out of a basket already checked out, so they create a new basket containing the missing items. However, they requ

Using DELETE This process has three forms. The DELETE removes all elements from the collection. DELETE(n) removes the nth element from the nested table. When n is null, then D

Initial thought process: Design a script which was simple and user friendly. Integrate procedures/functions to extract data under the hood. I focused on giving the user the opt

Parameter and Keyword Description: label_name: This is an undeclared identifier which optionally labels a loop. When used, the label_name should be enclosed by double ang

Number Types The Number types permit you to store the numeric data (real numbers, integers, and floating-point numbers), show quantities, and do computations. BINARY_INTEG

THEO R Y OF PANSPERMIA - Arrhenius (1908) postulated the cosmic panspermia theory that claims that organisms existed throughout the universe, and their spores, etc., could

EXECUTE IMMEDIATE Statement   The EXECUTE IMMEDIATE statement prepare (parses) and instantly executes a dynamic SQL statement or an anonymous PL/SQL block. Syntax:

Explicit Cursors The set of rows returned by the query can include zero, one, or multiple rows, depending on how many rows meet your search criteria. Whenever a query returns

Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI

Oracle 10G new features:- Automatic Database Diagnostic Monitor System Advancements - these methods will provides several methods for extracting reports through the Automatic