Layla
Layla

Reputation: 5486

execute procedure in oracle 10g

I have typed a procedure using the web interface of the Oracle 10g. Compile the code and no error at all. For executing this procedure I should use the command EXECUTE name, but when I put that into a SQL window it does not work at all and says that is an invalid SQL command. The question that I have is how I can execute that procedure? I can access it by the Object Browser, but nothing more. Thanks

Upvotes: 1

Views: 12973

Answers (1)

Nick Krasnov
Nick Krasnov

Reputation: 27251

In order to execute your procedure enclose it with begin end block. Execute command is sql*plus's command. To that end to execute your procedure you might write:

begin 
  your_procedure_name;
end; 

and in sql*plus you would use exec or execute(which implicitly encloses your procedure with begin end block):

SQL> exec your_procedure_name;

Upvotes: 3

Related Questions