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 -> Truncate table call in procedure

Truncate table call in procedure

From: Ron Lamb <rlamb_at_columbus.rr.com>
Date: Thu, 20 Jan 2000 15:39:04 -0500
Message-ID: <867rcj$6cf$1@ssauraab-i-1.production.compuserve.com>


I am having trouble creating a stored procedure in Oracle 7.3.4

The procedure runs once a month and summarizes records in a detail table into a summary table and then clears the detail table.

Everything works except that Oracle doesn't seem to allow the truncate command in a procedure. I took all the code out except the truncate and found that the following procedure definition won't compile

procedure new_month is
begin

   truncate table Detail;
end;

but the following will

procedure new_month is
begin

    delete Detail;
end;

I would prefer to truncate the table rather than delete the records. Can this be done?

Ron Received on Thu Jan 20 2000 - 14:39:04 CST

Original text of this message

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