ORA-00900: invalid SQL statement - when starting a procedure in oracle 10g

I am using an Oracle 10g database and trying to start a procedure using SQL commands.

create or replace procedure "exam" is begin DBMS_OUTPUT.PUT_LINE('Test'); end; 

Then click the Run button. It shows: "created procedure."

When I try to execute it using:

 execute exam; 

then click the โ€œRunโ€ button, it shows:

 ORA-00900: invalid SQL statement 

Thank you for your help.

+7
source share
3 answers

Just noticed the detail in your question. You press the run button. Therefore, you should use an IDE.

You cannot use execute in the IDE - this is the sql*plus command. However, it can work in Oracle SQL Developer, but I would not use it there,

Try

 begin exam; end; 
+13
source

Lose double quotes around the name. They do not work well in Oracle.

+1
source

See: Syntax error when trying to call Oracle package using ODBC in C #

You must put "{" and "}" before the command. Example:

  processListCmd.CommandType = CommandType.StoredProcedure; processListCmd.CommandText = "{ call rep_invnr_proclist }"; processListCmd.ExecuteNonQuery(); 
+1
source

All Articles