Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re:Truncate in a procedure?
Ron,
Truncate is a DDL command therefore they'll need to do it within dynamic sql, probably using the DBMS_SQL package. Under 8i your suppose to be able to use "execute immediate", but I haven't tried it yet.
DickG.
____________________Reply Separator____________________ Author: "Smith; Ron L." <rlsmith_at_kmg.com> Date: 2/16/2001 7:50 AM
I have a developer that is trying to truncate a table from within a procedure. If he does a delete it works ok. If he tries to issue the truncate command he gets errors. He is running the procedure as the schema owner. Is there a problem with issuing a truncate command from within a procedure?
Ron Smith
Database Administration
rlsmith_at_kmg.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Smith, Ron L.
INET: rlsmith_at_kmg.com
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).
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 Fri Feb 16 2001 - 11:58:41 CST