2、oracle编程专家--SQLPLUS设置

1、设置输出

SQL>set serveroutput on

这样每次输入会显得相当麻烦,一劳永逸办法如下

2、设置login.sql脚本,然后设置SQLPATH变量

login.sql内容参考如下:

define _editor=vi

set serveroutput on size 1000000

set trimspool on

set long 5000

set linesize 100

set pagesize 9999

column plan_plus_exp format a80

column global_name new_value gname

set termout off

define gname=idle

column global_name new_value gname

select lower(user) || '@' || substr( global_name, 1, decode( dot, 0, length(global_name), dot-1) ) global_name

  from (select global_name, instr(global_name,'.') dot from global_name );

set sqlprompt '&gname> '

set termout on

然后设置SQLPATH变量位login.sql所在的脚本即可

你可能感兴趣的:(2、oracle编程专家--SQLPLUS设置)