Skip to main content

Posts

Showing posts with the label Varray in PL/SQL

Varray in PL/SQL to manipulate elements in Program

PL/SQL Arrays in Oracle. VARRAY is known as Variable sized array , A VARRAY is single-dimensional collections of elements with the same data type. A VARRAY always has a fixed number of elements(bounded) and never has gaps between the elements (not sparse). In other word we can say PL/SQL programming Language provides a data structure that is known as VARRAY, which is used to store a fixed size sequential collection of elements of the same type. All vaarays consist of contigious memory location . The lowest address represent the first element and the highest address represent to the last element. Note : Array in PL/SQL is a part of Collection data type , we will explain PL/SQL Collection , Nested Table and it’s types in the next blog. In Vaaray each element has an index associated with it and also maximum size can be changed dynamically. Let’s create a Varray Type to understand how the type of element stored in the varray. Syntax for creating Vaaray in schema is as below: CREATE ...