oracle glogin.sql sql> _user,oracle sqlplus常用命令

以为内容选自Oracle官方文档:

----------------------------------------------------------------------------------------------------

1、glogin.sql常用脚本(配置sqlplus command line)

-- To change the SQL*Plus prompt to display the current user,

-- connection identifier and current time.

-- First set the database date format to show the time.

ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH:MI:SS';

-- SET the SQLPROMPT to include the _USER, _CONNECT_IDENTIFIER

-- and _DATE variables.

SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER> "

-- To set the number of lines to display in a report page to 24.

SET PAGESIZE 24

-- To set the number of characters to display on each report line to 78.

SET LINESIZE 78

-- To set the number format used in a report to $99,999.

SET NUMFORMAT $99,999

2、常用命令:

--host                                      sql会话模式利用host命令调用cmd命令

--show                           显示变量货参数值

--describle/desc    描述表结构内容

--SET 命令集:

--SET PAGESIZE 60                    设置一页显示行数

--

--store and restore

e.g.

{

SCOTT@orcl> store set c:\plusenv.sql --存储当前session set 变量值

已创建 file c:\plusenv.sql

SCOTT@orcl> show pagesize

pagesize 24

SCOTT@orcl> set pagesize 60

SCOTT@orcl> show pagesize

pagesize 60

SCOTT@orcl> start c:\plusenv.sql

SCOTT@orcl> show pagesize

pagesize 24

SCOTT@orcl>

}

To be continue...

---------------------------

Dylan Presents.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值