Home » SQL & PL/SQL » SQL & PL/SQL » how do i issue the truncate table tab1 statement within a plsql procedure
how do i issue the truncate table tab1 statement within a plsql procedure [message #36604] Thu, 06 December 2001 01:08 Go to next message
krs
Messages: 9
Registered: November 2001
Junior Member
Hi,
How can i issue the
" truncate table tab1 drop storage " statement inside a plsql procedure.

Thanks
Srini

----------------------------------------------------------------------
Re: how do i issue the truncate table tab1 statement within a plsql procedure [message #36606 is a reply to message #36604] Thu, 06 December 2001 03:39 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
execute immediate 'truncate table tab1';

remember truncate table command issues commit

----------------------------------------------------------------------
Re: how do i issue the truncate table tab1 statement within a plsql procedure [message #36628 is a reply to message #36604] Thu, 06 December 2001 18:39 Go to previous message
Satish Shrikhande
Messages: 167
Registered: October 2001
Senior Member
create or replace procedure a12 as
a varchar2(100):='T';
begin
execute immediate 'truncate table '||a;
end;

here define a variable which will hold the name of table .

----------------------------------------------------------------------
Previous Topic: adding table to memory?
Next Topic: Truncating a Table from SP
Goto Forum:
  


Current Time: Fri Mar 29 04:43:32 CDT 2024