SQL SqlPlus SP2-0734:错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22951710/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SqlPlus SP2-0734: Error
提问by mako
I am new to using SqlPlus but not new to using SQL, and I get the following error after writing this in my editor and attempting to run the script that I wrote. All of this appears to be valid and works on sql fiddle... I am not sure what the issue is. Any ideas?? None of the files I create seem to work....
我是使用 SqlPlus 的新手,但不是使用 SQL 的新手,在我的编辑器中编写此内容并尝试运行我编写的脚本后,我收到以下错误。所有这些似乎都是有效的并且适用于 sql fiddle ......我不确定问题是什么。有任何想法吗??我创建的文件似乎都不起作用....
SQL> start sales.sq;
which contains
其中包含
1 create table salesreps
2 (empl_num number(3,0) primary key,
3 name varchar2(15) not null,
4 age number(3,0),
5 rep_office number(2,0),
6 title varchar2(10),
7 hire_date varchar2(10) not null,
8 manager number(3,0),
9 quota number(10,2),
10 sales number(10,2) not null);
Generating the following errors
产生以下错误
SP2-0734: unknown command beginning "name varch..." - rest of line ignored.
SP2-0734: unknown command beginning "age number..." - rest of line ignored.
SP2-0734: unknown command beginning "rep_office..." - rest of line ignored.
SP2-0734: unknown command beginning "title varc..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "hire_date ..." - rest of line ignored.
SP2-0734: unknown command beginning "manager nu..." - rest of line ignored.
SP2-0734: unknown command beginning "quota numb..." - rest of line ignored.
SP2-0734: unknown command beginning "sales numb..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
回答by APC
By default SQL*Plus doesn't like blank lines. However we can easily configure our SQL*Plus environment to ignore them:
默认情况下,SQL*Plus 不喜欢空行。但是,我们可以轻松配置 SQL*Plus 环境以忽略它们:
SQL> set sqlblanklines on
We can also put the setting in our glogin.sql file (assuming we're allowed to edit it, which isn't always the case).
我们也可以将设置放在我们的 glogin.sql 文件中(假设我们可以编辑它,但情况并非总是如此)。
Note that this parameter doesn't work in ancient versions of the client.
请注意,此参数在客户端的旧版本中不起作用。