create table Z_TEST (
id integer,
val varchar2(10)
)
ORA-00955: name is already used by an existing objectMore Details: https://docs.oracle.com/error-help/db/ora-00955
create or replace package ZPKG1 as
type ZTestColl is table of Z_TEST%rowtype;
procedure test;
end;
Package created.
create or replace package body ZPKG1 as
tab1 ZTestColl := ZTestColl();
procedure test as
c integer;
begin
dbms_output.put_line('testing select from table()');
select count(*) into c from table(tab1);
dbms_output.put_line('testing select from .. where id in (select id from table())');
select count(*) into c from Z_TEST where id in (select id from table(tab1));
dbms_output.put_line('testing delete from .. where id in (select id from table())');
delete from Z_TEST where id in (select id from table(tab1));
exception when others then
dbms_output.put_line(sqlerrm);
end;
end;
Package Body created.
exec zpkg1.test
testing SELECT from table()
testing SELECT from .. where id in (select id from table())
testing DELETE from .. where id in (select id from table())
ORA-00902: invalid datatype