Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL
Hervé Ferreira wrote:
> Hello,
>
> I want to create a table in a pl/sql procedure to store the output
> while I gather it, but i'm having trouble with creating a table in my
> procedure. How could i solve this?
You do it using native dynamic SQL or DBMS_SQL.
That said I'll bet a latte' your background is SQL Server or Sybase ... and you need to know that the fact that you CAN do it doesn't mean you should: and you should NOT.
In Oracle we can create temporary tables but there is NEVER in my experience a valid reason for doing so. We don't have lock and transaction limitations. Just collect the data in a cursor or PL/SQL table or worst case in a global temporary table.
Then find a copy of Tom Kyte's recently out of print book "Expert one-on-one Oracle" and read it cover to cover paying special attention to the first three chapters.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Fri May 02 2003 - 10:55:34 CDT
![]() |
![]() |