Hi,
I am testing the usage of object table to display the contents of a table but not able to construct the arguments properly. Can anyone tell me what step should be corrected.
create or replace type ob_alphabets as object (alpha char(1));
create table alphabets of ob_alphabets;
Quote: |
inserted A to Z into alphabets
|
create or replace type ob_tabalpha as table of ob_alphabets;
declare
a ob_tabalpha = new ob_tabalpha();
cursor c1 is select * from alphabets;
b c1%rowtype;
i int := 0;
begin
for c in c1 loop
a(i):= c;
i:=i+1;
end loop;
for i in 1..26
loop
dbms_output.put_line(a(i));
end loop;
end;
[Updated on: Sun, 01 June 2008 00:44] by Moderator
Report message to a moderator