Knowledge Base

¿Qué es esto?

Oracle: PL/SQL: Arrays / Collections

14/11/2011 - 11/03/2019 -  Comentarios - Oracle PL/SQL

Los arrays se llaman collections, aquí un ejemplo de uno de los tres tipos de collection que hay:

DECLARE
     /* Definimos el tipo PAISES como tabla PL/SQL */
     TYPE PAISES IS TABLE OF NUMBER INDEX BY BINARY_INTEGER ;
     /* Declaramos una variable del tipo PAISES */
     tPAISES PAISES;
BEGIN
     tPAISES(1) := 1;
     tPAISES(2) := 2;
     tPAISES(3) := 3;
END;