How do I declare a variable in PL/SQL that is a table? I don't want a new table in the database. I want a variable that is declared at the beginning of my session and is automatically destroyed at the end.
I have created the following custom types obj_gifts & tbl_gifts
Create Or Replace Type obj_gifts as object (gifts_key number, gift_name vachar(100));
Create Or Replace Type tbl_gifts Is Table Of obj_gifts
I want something akin to the following
Declare gifts tbl_gifts
Insert Into gifts Values (1,'toy')
Select * from gifts
What I DO NOT WANT is to create a new table named gifts just to run my query.
insert
statement wouldn't be valid ifgifts
was defined based on an object type.