-
1
- #1
sathyarams
IS-IT--Management
To truncate a table(delete all rows)
Authorization : SYSADM, DBADM or CONTROL on the table
On Unix :
db2 connect to <dbname>
db2 import from /dev/null of del replace into <table-name>
On Windows:
Create a blank file C:\temp\blank.txt
db2 connect to <dbname>
db2 import from C:\temp\blank.txt of del replace into <tablename>
Authorization : SYSADM, DBADM or CONTROL on the table
On Unix :
db2 connect to <dbname>
db2 import from /dev/null of del replace into <table-name>
On Windows:
Create a blank file C:\temp\blank.txt
db2 connect to <dbname>
db2 import from C:\temp\blank.txt of del replace into <tablename>