Minggu, 17 April 2011

Contoh program array PL/SQL

Contoh program array PL/SQL

SET SERVEROUTPUT ON;
DECLARE
TYPE LARIK IS
TABLE OF NUMBER
INDEX BY BINARY_INTEGER;
A LARIK;
I INTEGER;
BEGIN
FOR I IN 1..5 LOOP
A(I) := I * 10;
END LOOP;
FOR I IN 1..5 LOOP
DBMS_OUTPUT.PUT_LINE(‘Nilai elemen larik ke-’ || TO_CHAR(I) || ‘ = ‘ || TO_CHAR(A(I)));
END LOOP;
END;
/

0 comments:

Posting Komentar