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 在第一行前面插入一行
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/