l***s 发帖数: 28 | 1 without having created a .sql file, I say to the command line:
SQL> edit test.sql
I was expecting the system will open the default VI editor and a
new file called test.sql to let me edit. But Oracle did not. It
led me to a blank of nothing. I had a hard time to go back to the
SQL> prompt. Finally got out of that blank line by randomly pushing
the q and return.
Then my question is: How shall I create a .sql file and edit it
in Oracle? What did I do wrong?
Thank you.. |
m******t 发帖数: 2416 | 2
Try
SQL> DEFINE _EDITOR=vi
SQL> EDIT test
【在 l***s 的大作中提到】 : without having created a .sql file, I say to the command line: : SQL> edit test.sql : I was expecting the system will open the default VI editor and a : new file called test.sql to let me edit. But Oracle did not. It : led me to a blank of nothing. I had a hard time to go back to the : SQL> prompt. Finally got out of that blank line by randomly pushing : the q and return. : Then my question is: How shall I create a .sql file and edit it : in Oracle? What did I do wrong? : Thank you..
|
s***m 发帖数: 28 | 3 You need to define your default editor in sqlplus environment. If you define
default editor as below, it is valid for current session only. You can set it
to default globally in a file called login.sql or glogin.sql belong to Oracle
installation. Add
define _editor=vi
in this file. Next time when you type edit in sqlplus, vi will be your editor. |