使用SQL>edit从缓冲区中调出刚才你输入的命令并粘贴到新记事本上,记事本以默认的afiedt.buf
命名。关闭记事本之后,如果想再执行一次这个命令,那可以直接在SQL>/然后enter执行。
要查看当前缓冲区中的数据,执行下列操作:
1,在SQL>提示符上键入字符L或者LIST或者一个分号查看;
2,要想只显示最后一行,可以通过LIST LAST实现;
3,如果需要删除一行,那么键入DEL,后面加上行号,然后enter;
4,可以键入INPUT或字母I并enter,向存储的SQL语句添加行,然后可以添加其余的文本行,要想将
文本添加到缓冲区中当前行的最后,可以输入APPEND或者字母A来实现。
例如:
SQL> select title, cost
from books;
TITLE COST
------------------------------ ----------
BODYBUILD IN 10 MINUTES A DAY 18.75
REVENGE OF MICKEY 14.2
BUILDING A CAR WITH TOOTHPICKS 37.8
DATABASE IMPLEMENTATION 31.4
COOKING WITH MUSHROOMS 12.5
HOLY GRAIL OF ORACLE 47.25
HANDCRANKED COMPUTERS 21.8
E-BUSINESS THE EASY WAY 37.9
PAINLESS CHILD-REARING 48
THE WOK WAY TO COOK 19
BIG BEAR AND LITTLE DOVE 5.32
TITLE COST
------------------------------ ----------
HOW TO GET FASTER PIZZA 17.85
HOW TO MANAGE THE MANAGER 15.4
SHORTEST POEMS 21.85
已选择14行。
SQL> L
1 select title, cost
2* from books
SQL> INPUT where pubid=4;
SQL> L
1 select title, cost
2 from books
3* where pubid=4
SQL> A ,retail
1* select title, cost,retail
SQL> L
1 select title, cost,retail
2 from books
3* where pubid=4
SQL> /
TITLE COST RETAIL
------------------------------ ---------- ----------
BODYBUILD IN 10 MINUTES A DAY 18.75 30.95
COOKING WITH MUSHROOMS 12.5 19.95
THE WOK WAY TO COOK 19 28.75
HOW TO GET FASTER PIZZA 17.85 29.95
更改操作,例如:
SQL> select * from v$parameter;
.....
SQL> L
1* select * from v$parameter
SQL> c/*/NUM/
1* select NUM from v$parameter
阅读(3075) | 评论(0) | 转发(0) |