DB2批量清空数据表

时间:2021-01-05 12:13:25

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'