I'm expecting a lot of downvotes, since I think this is a silly question, but here it goes:
I'm attempting at inserting data into a TABLE TYPE variable. I have a pre-existing TABLE TYPE, defined as:
create or replace type m_code_object
is object (m_code varchar2(25 char));
create or replace type m_code_tabletype
is table of m_code_object;
and the table that I want to define based on this and insert data into, is below:
declare
vtable m_code_tabletype;
begin
insert into vtable values ('a');
insert into vtable values ('b');
end;
Now, when running this in SQL Developer I get PL/SQL: ORA-00942: table or view does not exist
for both rows.
My understanding was that this is a table variable of type m_code_tabletype
and that it's enough to declare it in a block before trying to insert data into it.
Can anyone please explain what I'm doing wrong or what's missing from my understanding?
Thanks