小技巧:Oracle:sqlplus 显示行列字符数

 

遇到这种情况可以判断:行显示字符数不够,可以增加行显示字符数

    01.可以当前会话HR@ACE >set line 400;

    02.上面的方法其它会话不生效,懒不想每次设置怎么办?

   Oracle:cd $ORACLE_HOME/sqlplus/admin

[oracle@ACE admin]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/admin
[oracle@ACE admin]$ ll
total 20
-rw-r--r-- 1 oracle oinstall  427 May 12 05:29 glogin.sql
drwxr-xr-x 2 oracle oinstall 4096 Mar 31 23:59 help
-rw-r--r-- 1 oracle oinstall  226 Jul 17  2013 libsqlplus.def
-rw-r--r-- 1 oracle oinstall  813 Mar  7  2006 plustrce.sql
-rw-r--r-- 1 oracle oinstall 2118 Feb 16  2003 pupbld.sql
[oracle@ACE admin]$ cat glogin.sql
--
-- NAME
--   glogin.sql
set sqlprompt "_user'@'_connect_identifier >"
set line 300

命令vi glogin.sql  编辑文件

插入 set line 300

ESC进入命令行模式,:wq保存退出

再次连接SQLPLUS  生效

03

遇到这种列显示长度足够,但是由于列所占用字符过长使得占用行字符

HR@ACE >col LAST_NAME for a10;
--col   指定修改的列  for a(指定多少字符)

 

--完事

 

posted @ 2017-05-18 11:08  绿茶有点甜  阅读(1898)  评论(0编辑  收藏  举报