通过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 ~]$

你可能感兴趣的:(sqlplus)