SQL*PLUS里几个简单的编辑命令

    SQL*PLUS中的编辑命令很简单,只有几个而已,但是就是这几个颇为简单的命令,可以帮助我们完成几乎所有的编辑操作(可能比起其它的编辑工具来,要麻烦一些,但在我看来,有些地方比Win下的记事本还是要方面很多的,当然,如果我们要是使用Vim来作为SQL*PLUS的编辑工具,那么自然使用VIM要好很多,不过掌握熟悉基本的SQL*PLUS编辑命令还是很必要的)。
1、A[PPEND] text 把text增加到当前行后面
   注:1)To separate text from the preceding characters with a space, enter two spaces between APPEND and text.
       2)To APPEND text that ends with a semicolon, end the command with two semicolons (SQL*Plus interprets a single semicolon as an optional command terminator)
          不过目前还没有发现在什么情况下需要追加分号。
2、C[HANGE] /old/new/ 把当前行old符号替换成new符号,new为空,删除old符号
3、CL[EAR] BUFF[ER] 从sql buffer里删除所有的行
4、DEL n 删除sql buffer里第n行
5、I[NPUT] text 在sql buffer后面插入text
       1)To add a single line, enter the text of the line after the command INPUT, separating the text from the command with a space. To begin the line with one or more spaces, enter two or more spaces between INPUT and the first non-blank character of text.

       2)To add several lines, enter INPUT with no text. INPUT prompts you for each line. To leave INPUT, enter a null (empty) line or a period.
6、L[IST] n 显示sql buffer里第n行
    1)l 或者 ;列举所有行;
    2)ln 列举第n行;
    3)ln m 列举n到m行;
    4)ln * 列举n到当前行(需要n小于当前行);
    5)l * 列举当前行;
    6)l* n 列举当前行当n;
    7)l* last 列举当前行到最后;
    8)l last 列举最后行
7、n 使第n行为当前行
8、n    text 第n行替换成text
9、0    text 在第一行前面插入一行

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14790134/viewspace-567228/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14790134/viewspace-567228/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值