plsql array

Solutions on MaxInterview for plsql array by the best coders in the world

showing results for - "plsql array"
Caesar
17 Jan 2017
1DECLARE 
2   type namesarray IS VARRAY(5) OF VARCHAR2(10); 
3   type grades IS VARRAY(5) OF INTEGER; 
4   names namesarray; 
5   marks grades; 
6   total integer; 
7BEGIN 
8   names := namesarray('Kavita', 'Pritam', 'Ayan', 'Rishav', 'Aziz'); 
9   marks:= grades(98, 97, 78, 87, 92); 
10   total := names.count; 
11   dbms_output.put_line('Total '|| total || ' Students'); 
12   FOR i in 1 .. total LOOP 
13      dbms_output.put_line('Student: ' || names(i) || ' 
14      Marks: ' || marks(i)); 
15   END LOOP; 
16END; 
17/