Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does DB2 have functionality similar to Oracles truncate command?

0
Posted

Does DB2 have functionality similar to Oracles truncate command?

0

Yes. A delete from a table will delete one row at a time and could cause extensive logging. To avoid this we could run a “import from /dev/null.. replace into” statement, which basically truncates the entire table without logging. This is similar to Oracle’s truncate functionality. A sample truncate script called truncate.db2, which is available through DB2 Information center, can also be run to truncate a table. The following URL has a link for truncate.db2: http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm C.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123