使用spool导出数据
源地址:http://wallimn.iteye.com/blog/472182
set trimspool on
set echo off
set feedback off
set pagesize 0
set heading off
set term off
spool 路径+文件名
select col1||','||col2||','||col3||','||col4||'..' from tablename;
spool off