ITPub博客

首页 > Linux操作系统 > Linux操作系统 > sqlplus set

sqlplus set

原创 Linux操作系统 作者:Oraxu 时间:2011-04-07 14:15:45 0 删除 编辑

sql>set patgesize 0 ; //输出每页行数,缺省为24,为了避免分页,可设定为0。

sql>set linesize 100; //输出一行字符个数,缺省为80

sql>set  colsep '||'  //域输出分隔符号

输出示例
OBJECT_TYPE                                              || OBJECT_ID||DATA_OBJECT_ID||CREATED            ||LAST_DDL_TIME      ||TIMESTAMP
---------------------------------------------------------||----------||--------------||-------------------||-------------------||---------------------------------------------------------
TABLE                                                    ||     51843||         51243||2009-10-11 09:24:31||2009-10-11 09:24:31||2009-10-11:09:24:31
INDEX                                                    ||     51844||         51244||2009-10-11 09:24:31||2009-10-11 09:24:31||2009-10-11:09:24:31
TABLE                                                    ||     51845||              ||2009-10-11 09:24:31||2009-10-11 09:24:57||2009-10-11:09:24:31
INDEX                                                    ||     51846||         51246||2009-10-11 09:24:31||2009-10-11 09:24:31||2009-10-11:09:24:31
TABLE                                                    ||     51847||         51247||2009-10-11 09:24:32||2009-10-11 09:24:57||2009-10-11:09:24:32
INDEX                                                    ||     51848||         51248||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51849||         51270||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32


sql>set echo on;//默认on

sql>set feedback off;/默认on,关闭回写

sql>set heading off; //关闭域标题输出,缺省为on

输出示例
TABLE                                                    ||     51843||         51243||2009-10-11 09:24:31||2009-10-11 09:24:31||2009-10-11:09:24:31
INDEX                                                    ||     51844||         51244||2009-10-11 09:24:31||2009-10-11 09:24:31||2009-10-11:09:24:31
TABLE                                                    ||     51845||              ||2009-10-11 09:24:31||2009-10-11 09:24:57||2009-10-11:09:24:31
INDEX                                                    ||     51846||         51246||2009-10-11 09:24:31||2009-10-11 09:24:31||2009-10-11:09:24:31
TABLE                                                    ||     51847||         51247||2009-10-11 09:24:32||2009-10-11 09:24:57||2009-10-11:09:24:32
INDEX                                                    ||     51848||         51248||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51849||         51270||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51850||         51271||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51851||         51272||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32

TABLE                                                    ||     51852||         51250||2009-10-11 09:24:32||2009-10-11 09:24:57||2009-10-11:09:24:32
INDEX                                                    ||     51853||         51251||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51854||         51266||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
TABLE                                                    ||     51855||         51253||2009-10-11 09:24:32||2009-10-11 09:24:57||2009-10-11:09:24:32
INDEX                                                    ||     51856||         51254||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
TABLE                                                    ||     51857||         51255||2009-10-11 09:24:32||2009-10-11 09:24:57||2009-10-11:09:24:32
INDEX                                                    ||     51858||         51256||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51859||         51257||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32
INDEX                                                    ||     51860||         51262||2009-10-11 09:24:32||2009-10-11 09:24:32||2009-10-11:09:24:32


sql>set numwidth 12;      //输出number类型域长度,缺省为10

sql>set termout off;      //关闭脚本中的命令的执行结果输出,缺省为on

SQL>set trimout on;    //去除标准输出每行的拖尾空格,缺省为off

SQL>set trimspool on;   //去除重定向(spool)输出每行的拖尾空格,缺省为off

SQL>set serveroutput on;  //设置允许显示输出类似dbms_output

SQL>set timing on;        //设置显示“已用时间:XXXX”

SQL>set autotrace on;     //设置允许对执行的sql进行分析

SQL>set verify off;       //可以关闭和打开提示确认信息old 1和new 1的显示.

http://www.orafaq.com/wiki/SQL*Plus_FAQ


 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20948177/viewspace-691871/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 冷备份脚本
下一篇: sqlplus host命令
请登录后发表评论 登录
全部评论

注册时间:2011-04-06

  • 博文量
    8
  • 访问量
    10530