using existsthe existsn returns true if the nth


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.

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: using existsthe existsn returns true if the nth
Reference No:- TGS0172657

Expected delivery within 24 Hours