definicion de matrices PL/SQL
Publicado por Juan Carlos (1 intervención) el 19/11/2006 21:46:08
Necesito ayuda en la definicion de matrices en PL/SQL como se la define y como se la llena
Gracias
Gracias
Valora esta pregunta


0
DECLARE
TYPE INFOPAISES IS TABLE OF PAISES%ROWTYPE INDEX BY BINARY_INTEGER;
datosPais INFOPAISES;
BEGIN
datosPais(1).nombre := 'ECUADOR';
datosPais(1).continente := 'AMERICA';
datosPais(2).nombre := 'MEXICO';
datosPais(2).poblacion := 'AMERICA';
FOR i IN datosPais.FIRST..datosPais.LAST
LOOP
dbms_output.put_line('Pais: ' || datosPais(i).nombre || '. Continente: ' || datosPais(i).continente);
END LOOP;
END;
/