日期:2014-05-17 浏览次数:21487 次
--实验了一下没有出现你说的问题 [TEST@orcl] SQL>select * from t1; ID NAME SCORE ---------- ---------- ---------- 1 张三 100 2 李四 50 3 王五 60 [TEST@orcl] SQL>desc t1 名称 是否为空? 类型 ----------------------------------------- -------- ---------------------------- ID NOT NULL NUMBER NAME VARCHAR2(10) SCORE NUMBER(10) [TEST@orcl] SQL>set echo off ; [TEST@orcl] SQL>set pages 0 ; [TEST@orcl] SQL>set feedback off; [TEST@orcl] SQL>set heading off; [TEST@orcl] SQL>set verify off; [TEST@orcl] SQL>set numwidth 5 ; [TEST@orcl] SQL>set linesize 11; [TEST@orcl] SQL>set trims on; [TEST@orcl] SQL>spool d:\PROD_OFFER_PRIVILEGE.txt [TEST@orcl] SQL>select replace(id,chr(32),'')||'|'||replace(name,chr(32),'')||'|'||replace(score,chr(32),'')||'|' from t1 ; 1|张三|100| 2|李四|50| 3|王五|60| [TEST@orcl] SQL>spool off; [TEST@orcl] SQL>exit 从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production With the Partitioning, OLAP and Data Mining options 断开 --下面是文件内容 [TEST@orcl] SQL>select replace(id,chr(32),'')||'|'||replace(name,chr(32),'')||'|'||replace(score,chr(32),'')||'|' from t1 ; 1|张三|100| 2|李四|50| 3|王五|60| [TEST@orcl] SQL>spool off;