Showing posts with label How we can use ARRAYS in PL/SQL. Show all posts
Showing posts with label How we can use ARRAYS in PL/SQL. Show all posts

What is PL/SQL?

What is PL/SQL?
PL/SQL is Oracle's Procedural Language extension to SQL. The language
includes object oriented programming techniques such as encapsulation,
function overloading, information hiding (all but inheritance), and so,
brings state-of-the-art programming to the Oracle database server and a
variety of Oracle tools.

How we can use ARRAYS in PL/SQL

How we can use ARRAYS in PL/SQL
Example for Arrays
declare
TYPE v_array IS TABLE OF emp.empno%TYPE INDEX BY BINARY_INTEGER;
a v_array;
b number:=0;
BEGIN
FOR I in 0..5 loop
b:=b+1;
a(I):=b;
END LOOP;
dbms_output.put_line(a(0));
END;
/