close
Customized SQL*PLUS SQLPROMPT with COLUMN NEW_VALUE
Modify $ORACLE_HOME/sqlplus/admin/glogin.sql
add the followings:
(For Privileged User)
>>
SET TERMOUT OFF
alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
COLUMN X NEW_VALUE Y
SELECT NAME FROM V$DATABASE;
COLUMN TODAY N
EW_VALUE DATE
SELECT TO_CHAR(SYSDATE,'YYYY-MM-DD') as "TODAY" FROM DUAL;
SET SQLPROMPT '&_USER/&&Y/&&DATE/> '
SET TERMOUT ON
(For Unprivileged User)
>>
SET TERMOUT OFF
alter session set nls_date_format='yyyy-mm-dd';
SET SQLPROMPT '&_USER/&_CONNECT_IDENTIFIER/&_DATE>'
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
SET TERMOUT ON
全站熱搜
留言列表