Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
rollback behaviorwhen a forall statement fails the database changes are rolled back to an implicit savepoint marked before each of the sql statement
using the forall statementthe keyword forall instruct the plsql engine to bulk-bind input collections before sending them all to the sql engine
how bulk binds improve performancethe assigning of values to the plsql variables in sql statements is known as bindingthe binding of the whole
using deletethis process has three forms the delete removes all elements from the collection deleten removes the nth element from the nested table
using trimthis process has two forms the trim removes an element from the end of the collection the trimn removes the n elements from the end of the
using extendto enlarge the size of a collection use extend this process has 3 forms the extend appends one null element to a collection and the
using prior and nextthe priorn returns the index number that precede index n in a collection the nextn returns the index number which succeed the
using first and lastfirst and last return the first and last minimum and maximum index numbers in a collection when the collection is empty the first
using limitfor nested tables that have no maximum size the limit returns null for varrays the limit returns the maximum number of elements that a
using countthe count returns the number of elements that a collection presently contains for instance when a varray projects contains 15 elements
using existsthe existsn returns true if the nth element in a collection exist or else existsn returns false primarily you use exists with delete to
using the collection methodsthe collection methods below help to generalize the code and make collections easier to use and also make your
manipulating local collectionswithin plsql to manipulate the local collection by using the table and cast operators the operands of cast are a
manipulating individual elementsfaraway you have manipulated an entire collection within the sql to manipulate the individual elements of the
some varray examplesin sql plus assume that you define an object type project as described belowsqlgt create type project as object 2 projectno
manipulating collectionswithin plsql the collections add procedural power and flexibility the biggest benefit is that your program can compute
assigning and comparing collectionsone collection can be assigned to other by an select insert update or fetch statement an assignment statement or
initializing and referencing collectionsuntil you initialize a collection a nested table or varray is automatically null ie the collection itself is
defining and declaring collectionsto create the collections you must define a collection type and then declare the collections of that type you can
varrays versus nested tablesthe nested tables are differing from varrays in the following ways1 varrays have a maximum size while nested tables
nested tables versus index-by tablesthe index-by tables and nested tables are just similar for eg they have similar structure and their
what is a collectionthe collection is an ordered group of elements all of similar type for eg the grades for a class of students each element has a
null statementthe null statement clearly specifies in action it does nothing other than to pass control to the next statement it can though improve
goto statementthe goto statement branches to a label unconditionally the label must be exclusive within its scope and should precede an executable
sequential controldissimilar to the if and loop statements the goto and null statements are not important to the plsql programming the configuration