您的位置:程序门 -> db2 -> 数据库开发



如何快速清除db2的大表?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何快速清除db2的大表?
发表于:2007-05-18 15:09:59 楼主
我是as/400的平台,我用   alter   table   table_name   active   not   logged   initally   with   empty   table命令无法执行,报db21034e     the   command   was   processed   as   an   sql   statement   because   it   was   not   a
valid   command   line   processor   command.     during   sql   processing   it   returned:
sql0104n     an   unexpected   token   "active "   was   found   following   " ".     expected
tokens   may   include:     "add   drop   alter   check   unique   foreign   primary   constraint ".
sqlstate=42601
是不是此命令不支持在as/400平台上运行呢?如果是,有什么替代的语句吗?
发表于:2007-05-18 17:37:091楼 得分:0
1、导出空文件:
export   to   empty.ixf   of   ixf   select   *   from   table_name   where   1=2
2、导入空文件:
import   from   empty.ixf   of   ixf   replace   into   table_name

或者
  import   from   /dev/null     of   del   replace   into   table_name

你看看吧
发表于:2007-05-28 12:45:022楼 得分:0
alter   table   tblname   activate   not   logged   initially   with   empty   table
发表于:2007-07-03 09:08:033楼 得分:0
该回复于2007-12-29 16:24:29被管理员或版主删除


快速检索

最新资讯
热门点击