Been tasked with converting MS/Sybase SQLServer stored procedures to
Oracle... Oh yea, fairly fluent in SQL but not at all wrt stored proc's
of any type...
Under SQLServer they often create temporary tables inside a stored
procedure via a statement like
SELECT * INTO #Orders
FROM Orders
WHERE CustomerID = 12345;
They do some massaging of the data...
... and finally select a subset of it prior to the end of the procedure.
Being a pin-head I figure I can execute some DDL via DBMS_SQL in my
stored procedure to create the tables and everything would be hunky
dory. Question is - how big a pin-head am I?
Seriously though,
How do I create temporary tables?
Are they persistent beyond the current transaction? Is that the
stored procedures transaction or the calling applications?
Are they created for each user or are they created on behalf of
the owner of the procedure and everyone shares!