通过sqlplus导出数据到csv

例子

[oracle@localhost ~]$ cat data.sql
set echo off
set feedback off
set linesize 100
set pagesize 0
set sqlprompt ''
set trimspool on
spool data.csv
select id || ',' || val from testtab;
spool off
exit
[oracle@localhost ~]$

posted @ 2014-05-15 10:21  健哥的数据花园  阅读(7296)  评论(0编辑  收藏  举报