在SQLPLUS里
set echo off
set feedback off
set heading off
set linesize 你想要的长度
set pagesize 一页的行数
spool c:\文件名
select col1||'|'||col2||'|'||col3||'|'||....
from ur_table
where ur_condition;
spool off
set echo off
set feedback off
set heading off
set linesize 你想要的长度
set pagesize 一页的行数
spool c:\文件名
select col1||'|'||col2||'|'||col3||'|'||....
from ur_table
where ur_condition;
spool off
set feedback off
set heading off
spool c:\文件名
select * from marc_data
spool off
运行结果:
SQL> select * from marc_data;0000000001 0
00513nam0 2200217 450 00100110000000500170001101000200002810000410004810100080
00891020007000971050018001041060006001222000040001282100031001682150022001993000
013002216060012002346900019002467010017002657020013002820000000001200504121558
00.0 a7111121538d108 a20050412d ekmy0chiy0121 ea1 achi aCN
ay z 000yy ar1 aoracle 参考手册f发发发发著g方法译 a北京c机械
工业出版社d2003 a728页c插图d26cm a不做描述 aoracle atp211.138or
v4 1a发发发发4著 0a方法4译
SQL> spool off
这个 SQL> select * from marc_data;
SQL> spool off 还带着啊
我只想要中间的内容部分
SQL> select * from marc_data;
SQL> spool off
也去掉啊
set echo off
set feedback off
set heading off
spool c:\文件名
select * from marc_data
spool off
然后运行
SQL>@c:\test.sql
显示,这是什么意思
SQL> @c:\test.sql
3
set feedback off 取消数据回显
set heading off 取消列标题
set linesize num 你想要的长度
set pagesize num 一页的行数
spool c:\文件名
select * from marc_data
spool off
SQL>@c:\test.sql 是运行脚本
就执行了?
set echo off 不显示语句