13590--北极燕鸥


   博采众长,信誉卓著

导航

DB2批量清空数据表

Posted on 2011-03-10 16:18  北极燕鸥  阅读(1008)  评论(0编辑  收藏  举报

export to c:\my.txt of del select 'IMPORT FROM c:\aa.txt OF DEL REPLACE INTO '|| rtrim(tabschema)  ||'.'|| rtrim(tabname) || ' ; ' from syscat.tables where tabschema in('DOCUMENT','ESTATE','FCXXBMS','FINANCE','HSSYSTEM','IMG2008','REGISTER','SECONDHAND','SEMISTATIC','TENANCY','SYSTEM') and type='T'

 

 

select 'IMPORT FROM c:\aa.txt OF DEL REPLACE INTO '|| rtrim(tabschema)  ||'.'|| rtrim(tabname) || ' ; ' from syscat.tables where tabschema = 'ESTATE' and type='T'