If you wish to use SQL*Plus Command-line , you'll simply issue the sqlplus command from your shell: $ sqlplus. $ sqlplusschema@//machine.domain:port/database. set colsep , set headsep off set pagesize 0 set trimspool on. set linesize # set numwidth #
关于SPOOL(SPOOL是SQLPLUS的命令,不是SQL语法里面的东西.) 对于SPOOL数据的SQL,最好要自己定义格式,以方便程序直接导入,SQL语句如: select taskindex||'|'||commonindex||'|'||tasktype||'|'||to_number(to_char(sysdate,'YYYYMMDD')) from ssrv_sendsms_task; spool常用的设置 set colsep' '; //域输出分隔符 set echo off;
关于SPOOL(SPOOL是SQLPLUS的命令,不是SQL语法里面的东西.) 对于SPOOL数据的SQL,最好要自己定义格式,以方便程序直接导入,SQL语句如: select taskindex||'|'||commonindex||'|'||tasktype||'|'||to_number(to_char(sysdate,'YYYYMMDD')) from ssrv_sendsms_task; spool常用的设置 set timing on ; //显示SQL语句的运行时间.默认值为OFF
出自:http://wallimn.iteye.com/blog/472182 实践 只能在一个终端上的一个窗口中进行操作 第一步:连接oracle数据库 sqlplus qkp/mm_eftqkp@eftoldb; 第二步: set colsep ',' --分隔符 set trimspool on set linesize 1500--设置行宽,根据需要设置,默认100set pagesize 2000 set newpage 1 set heading
关于SPOOL(SPOOL是SQLPLUS的命令,不是SQL语法里面的东西.) 对于SPOOL数据的SQL,最好要自己定义格式,以方便程序直接导入,SQL语句如: select taskindex||'|'||commonindex||'|'||tasktype||'|'||to_number(to_char(sysdate,'YYYYMMDD')) from ssrv_sendsms_task; spool常用的设置 set colsep' '; //域输出分隔符 set echo off;