oracle ORA-00900: 无效的 SQL 语句错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2346749/
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
ORA-00900: invalid SQL statement error
提问by Sandeep Kumar
While running dbms command
运行 dbms 命令时
execute dbms_utility.analyze_schema('MCC','ESTIMATE',30);
I got ORA-00900: invalid SQL statement
error.
我有ORA-00900: invalid SQL statement
错误。
Can anyone tell me what could be the reason?
谁能告诉我可能是什么原因?
回答by FerranB
The executesentence is only for SQL*Plusutility.
在执行判决仅适用于SQL * Plus的实用性。
To call a PLSQL statement from the most of applications/languages you have to try some of the following, It depends on where you are playing:
要从大多数应用程序/语言调用 PLSQL 语句,您必须尝试以下一些方法,这取决于您在哪里玩:
Option 1. Without /
.
选项 1。没有/
.
begin
dbms_utility.analyze_schema('MCC','ESTIMATE',30);
end;
Option 2. With /
选项 2。和/
begin
dbms_utility.analyze_schema('MCC','ESTIMATE',30);
end;
/
回答by Piyush
You need to set the server output on before executing the procedure in SQL Developer. Kindly try below code:
在 SQL Developer 中执行该过程之前,您需要设置服务器输出。请尝试以下代码:
SET SERVEROUTPUT ON;
execute dbms_utility.analyze_schema('MCC','ESTIMATE',30);
If you still get the same error then please open your SQL*PLUS and check if PLSQL is installed in it.
如果您仍然遇到相同的错误,请打开您的 SQL*PLUS 并检查其中是否安装了 PLSQL。
回答by dhananjay singh
In Oracle 10g people face ORA-0900 Invalid SQL statement. Solution is try to execute stored procedure by placing the stored procedure between BEGIN
and END
keywords.
在 Oracle 10g 中,人们面临 ORA-0900 无效的 SQL 语句。解决方案是尝试通过将存储过程放在BEGIN
和END
关键字之间来执行存储过程。
begin
stored_procedure_name(parameter);
end;