clear screen
set serveroutput on size unlimited
select banner from v$version
create or replace package McDodd as
type Daughters_NT is table of NedMcDodd.firstname%type;
end;
declare
Daughters McDodd.Daughters_NT;
begin
Daughters := McDodd.Daughters_NT();
Daughters.extend(2);
Daughters(1) := 'Hooly';
Daughters(2) := 'Holy';
for i in (select n.firstname
from NedMcDodd n
where n.type = 18
and n.firstname not in (select *
from table(Daughters)
)) loop
dbms_output.put_line(i.firstname);
end loop;
end;
drop package McDodd
create or replace type Daughters_NT as table of varchar2(32)
sho err
declare
Daughters Daughters_NT;
begin
Daughters := Daughters_NT();
Daughters.extend(2);
Daughters(1) := 'Hooly';
Daughters(2) := 'Holy';
for i in (select n.firstname
from NedMcDodd n
where n.type = 18
and n.firstname not in (select *
from table(Daughters)
)) loop
dbms_output.put_line(i.firstname);
end loop;
end;
drop type Daughters_NT
create or replace package McDodd as
type Daughters_AA is table of NedMcDodd.firstname%type index by pls_integer;
end;
declare
Daughters McDodd.Daughters_AA;
begin
Daughters(1) := 'Hooly';
Daughters(2) := 'Holy';
for i in (select n.firstname
from NedMcDodd n
where n.type = 18
and n.firstname not in (select *
from table(Daughters)
)) loop
dbms_output.put_line(i.firstname);
end loop;
end;