Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Truncate table call in procedure
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
![]() |
![]() |