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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: truncate table

Re: truncate table

From: Veera Prasad <vprasad_at_olf.com>
Date: Wed, 03 Jan 2001 18:18:50 -0500
Message-Id: <10730.125652@fatcity.com>


Use Oracle 8i 's new feature called "execute immediate" , basically this feature generates dynamic sql code(parses) and immediately executes at the run time, you don't have to write much code, pretty cool feature for ddl's.

begin
execute immdiate ' truncate table <table_name>'; end;
/

Veera

Raj Gopalan wrote:

> Dynamic SQL.
>
> -----Original Message-----
> Sent: 03 January 2001 15:50
> To: oracledba_at_quickdoc.co.uk; ORACLE-L_at_fatcity.com
>
> Hi
>
> Is there any way of doing a truncate table command in a package/procedure
> ?
>
> TIA
> --
> Sajid Iqbal
> Database Administrator
>
> --------
> Think you know someone who can answer the above question? Forward it to
> them!
> to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com
> to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
> Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Raj Gopalan
> INET: raj.gopalan_at_netdecisions.co.uk
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Wed Jan 03 2001 - 17:18:50 CST

Original text of this message

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