SQLPlus Set常用设置

  • Post author:
  • Post category:其他





#

设置sqlplus输出的最大行宽





SQL> set linesize 140




#col name format a50 :

将列name(字符型)显示最大宽度调整为50个字符



SQL> col name format a50

SQL> select * from v$dbfile;

FILE# NAME

———- ————————————————–

4 /u01/oracle/oradata/OCP/users01.dbf

3 /u01/oracle/oradata/OCP/undotbs01.dbf

2 /u01/oracle/oradata/OCP/sysaux01.dbf

1 /u01/oracle/oradata/OCP/system01.dbf

5 /u01/oracle/oradata/OCP/example01.dbf




#

修改列标题




SQL> col name heading filename

SQL> select * from v$dbfile;

FILE# filename

———- ————————————————–

4 /u01/oracle/oradata/OCP/users01.dbf

3 /u01/oracle/oradata/OCP/undotbs01.dbf

2 /u01/oracle/oradata/OCP/sysaux01.dbf

1 /u01/oracle/oradata/OCP/system01.dbf

5 /u01/oracle/oradata/OCP/example01.dbf





#输出域标题,缺省为on



SQL> set heading off

SQL>  select * from v$dbfile;


4 /u01/oracle/oradata/OCP/users01.dbf

3 /u01/oracle/oradata/OCP/undotbs01.dbf

2 /u01/oracle/oradata/OCP/sysaux01.dbf

1 /u01/oracle/oradata/OCP/system01.dbf

5 /u01/oracle/oradata/OCP/example01.dbf



版权声明:本文为june_liu1原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。