Using exists - collection methods, PL-SQL Programming

Using EXISTS

The EXISTS(n) returns TRUE if the nth element in a collection exist. Or else, EXISTS(n) returns FALSE. Primarily, you use EXISTS with DELETE to maintain the sparse nested tables. You can also use EXISTS to avoid raising an exception whenever you reference a nonexistent element. In the example below, the PL/SQL executes the assignment statement only if the element i exists:

IF courses.EXISTS(i) THEN courses(i) := new_course; END IF;

When passed an out-of-range subscript, the EXISTS returns FALSE instead of raising SUBSCRIPT_OUTSIDE_LIMIT.

Posted Date: 10/4/2012 3:13:06 AM | Location : United States







Related Discussions:- Using exists - collection methods, Assignment Help, Ask Question on Using exists - collection methods, Get Answer, Expert's Help, Using exists - collection methods Discussions

Write discussion on Using exists - collection methods
Your posts are moderated
Related Questions
Create a procedure named STATUS_SHIP_SP that allows a company to employee in the Shipping Department to update the status of an order to add shipping information. The BB_BASKETSTAT

Negation (NOT, ¬) - SQL There are three rows instead of just two. As you can see, ¬ p is defined as in two-valued logic (2VL) when p is either true or false, but ¬ (unknown) i

i NEED TO CREATE 3 guiS IN pl/sql sERVER PAGE FORM

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Assignment Source Not a Literal - Variable Syntax: SET SN = SID (SUBSTRING (SN.C FROM 1 FOR 1)||'5');

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 ETERNITY OF LIFE (PRAYER - 1880) - The theory of eternity of life, also called the steady-state theory , states that life has ever been in existence as at presen

i NEED THE QURIES TO SOME OF THE PROBLEMS USING plsql

Bitmap Join Indexes - This feature will increase the performance and detains the size and format of your databases in data Character Semantics and Globalization -This featur

1. a. Write a trigger that fires when a part's price is updated. The trigger will write a record into a table called PriceUpdates. The record should contain the information of