avatar
editting .sql file problem# Database - 数据库
l*s
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..
avatar
m*t
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..

avatar
s*m
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.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。