如何以csv格式输出查询结果? (DBMR: 1893, version: DBMaster 4.3.2 bundle)
Export 命令只支持基本表。
EXPORT [INTO data-file]
TABLE table-name
[DESCRIPTION description-file]
[LOG log-file]
[STOP_ON_ERROR],
不支持export出查询结果。
考虑到性能问题,可以创建一个视图来代替查询结果。
例如:
(1) Create view v2 as select * from t1 inner join t2 on t1.c1 = t2.c3;
(2) export into tmp.csv table v2 description tmp.des;
视图是动态的,当被使用到时就会执行,所以导出CSV格式文件不会做额外的动作,从而性能将会好于创建临时表那种方式。