ORA-00900:在Oracle 10g中运行过程时无效的SQL语句

kum*_*mar 14 ide oracle plsql stored-procedures procedure

我正在使用Oracle 10g数据库并尝试使用SQL命令运行过程.

create or replace procedure "exam" is
begin
  DBMS_OUTPUT.PUT_LINE('Test');
end;
Run Code Online (Sandbox Code Playgroud)

然后单击"运行"按钮.它显示:"程序创建".

当我尝试使用以下方法执行它时:

execute exam;
Run Code Online (Sandbox Code Playgroud)

然后单击"运行"按钮,显示:

ORA-00900: invalid SQL statement
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助.

Kir*_*tev 20

刚刚注意到你问题中的细节.你按下run按钮.因此,您必须使用IDE.

您无法execute在IDE中使用- 它是一个sql*plus命令.它可能在Oracle SQL Developer中有效,但我不会在那里使用它;

尝试

begin
  exam;
end;
Run Code Online (Sandbox Code Playgroud)