Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: truncate table in stored pl/sql proc
Here's an example of how it's used.
procedure clean_ipl is
l_cursor integer; l_rtn number; begin -- l_cursor := dbms_sql.open_cursor; dbms_sql.parse(l_cursor,'truncate table mcsa.ipl_remarks',dbms_sql.v7); l_rtn := dbms_sql.execute(l_cursor); dbms_sql.close_cursor(l_cursor); -- l_cursor := dbms_sql.open_cursor; dbms_sql.parse(l_cursor,'truncate table mcsa.ipl_ch',dbms_sql.v7); l_rtn := dbms_sql.execute(l_cursor); dbms_sql.close_cursor(l_cursor); -- l_cursor := dbms_sql.open_cursor; dbms_sql.parse(l_cursor,'truncate table mcsa.ipl',dbms_sql.v7); l_rtn := dbms_sql.execute(l_cursor); dbms_sql.close_cursor(l_cursor); -- delete from mcsa.ipl_ei; commit; -- delete from mcsa.ipl_hd where date_created is not null; commit; --
Big Bear wrote in message <3736EE84.2901613B_at_hotmail.com>...
>hello,
>
>could anyone out there tell me if it is possible to include truncate
>table command in a pl/sql stored procedure. i tried it but when i
>compile it gives error "expecting 'table' when expecting......"
>
>thanks & regards.
>
Received on Mon May 10 1999 - 10:05:31 CDT
![]() |
![]() |