Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL

Re: PL/SQL

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Fri, 02 May 2003 08:55:34 -0700
Message-ID: <3EB294F5.3E15B03B@exxesolutions.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US