使用db2 export命令导出多个select语句的结果?

问题描述 投票:0回答:1

是否可以使用db2“ export”命令(https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008303.html)导出多个select语句的结果,例如db2命令行处理器(即db2 -tvf file.sql在file.sql中具有许多sql请求)?

最诚挚的问候

db2 export-to-csv db2-luw
1个回答
0
投票

你的意思是这样吗?

$ cat export
export to f1 of del values 1;
export to f2 of del values 2;

$ db2 -tf export
SQL3104N  The Export utility is beginning to export data to file "f1".

SQL3105N  The Export utility has finished exporting "1" rows.


Number of rows exported: 1


SQL3104N  The Export utility is beginning to export data to file "f2".

SQL3105N  The Export utility has finished exporting "1" rows.


Number of rows exported: 1
© www.soinside.com 2019 - 2024. All rights reserved.