Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to specify truncate table statement in PL/SQL block

Status
Not open for further replies.

request

Programmer
Dec 5, 2001
76
US
I have a PL/SQL block where I am specifying

truncate table table_name.

However, it gives an error for this statement.

How do you specify truncate statement in PL/SQL???

Thanks.
 
I had to do the following in a stored procedure:

sql_trunc := 'TRUNCATE TABLE EHGRIFF.C_AGENT';
EXECUTE IMMEDIATE sql_trunc;

Does that help? Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
in a standalone block put the truncate statement before the declare section
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top