Re: emptying data in a table

Re: emptying data in a table

 

  





Trace There are several ways to do what you are asking -

1) the way you suggested
2) use import (again replace using /dev/null)
3) delete * from table_name (Not recommended)

What I think I hear you asking is - is there a command similar to the
Oracle 'TRUNCATE' command?

See this article
(http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0402greenstein/)
for how to set up a trunacte command to do that

You could also set up a script that does your load replace from empty_file
- and then just pass it the name of the table to be emptied.

Be careful - I have seen way too many tables lost because of the Oracle
Truncate command.

HTH

Russ





"Trace R Jones "
<db2udbdba-ezmlms
hield-x17555524.x To
[Email Address Removed] "LazyDBA Discussion"
a.com> <[Email address protected]
cc
01/31/2005 07:58
AM Subject
emptying data in a table














What is your best method for emptying data from a table in UDB?

Right now I just use the Load Replace with an empty file.

Any better way?

TRJ



---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


ForwardSourceID:NT0003B8C2


DB2 & UDB email list listserv db2-l LazyDBA home page