首页 > 代码库 > DB2 导入导出相关

DB2 导入导出相关

导出表

db2look -d dbname -e -a -x -i username -w password -o ddlfile.sql 

 

通过表生成SQL

SELECT         ‘INSERT INTO ZYMS.‘ ||  t1.NAME || ‘ SELECT * FROM FJDC.‘ ||  t1.NAME || ‘;‘    FROM     sysibm.systables t1 JOIN     sysibm.systables t2 ON     t1.NAME=t2.NAME WHERE     t1.type=‘T‘ AND t1.creator=‘ZYMS‘ AND t2.creator=‘FJDC‘

 

DB2 导入导出相关