当前位置: 代码迷 >> DB2 >> 请教,db2有没有类似trancate table的命令
  详细解决方案

请教,db2有没有类似trancate table的命令

热度:3405   发布时间:2013-02-26 00:00:00.0
请问,db2有没有类似trancate table的命令?
对于数据量过大的表,想清除的话,delete真是不给力。
还不想drop表然后再重建。
请问各位大神,有没有其他的好方法?

------解决方案--------------------------------------------------------
import(load) from /dev/null of del replace into 表名

或者

alter table 表名 activate not logged initially with empty table

------解决方案--------------------------------------------------------
SQL code
import(load) from /dev/null of del replace into 表名或者alter table 表名 activate not logged initially with empty table
------解决方案--------------------------------------------------------
9.7以后公开支持 truncate table *** immediate
  相关解决方案