Reputation: 143
I am trying to write a simple "Hello World" procedure .... but it is not working
Code :
CREATE OR REPLACE PROCEDURE greetings
AS
BEGIN
dbms_output.put_line('Hello World!');
END;
/
After that I executed it like this :
EXECUTE greetings;
but I get an error :
ORA-00900: invalid SQL statement
Images are here :
Please help out as soon as possible ...thanks :)
Upvotes: 0
Views: 332
Reputation: 108400
I believe EXECUTE
is a SQL*Plus statement. It's not a valid SQL statement.
The error message being returned ORA-00900: invalid SQL statement
makes it appear that the client you are using is not emulating the SQL*Plus EXEC statement.
The general form for executing a PL/SQL procedure is to execute an anonymous PL/SQL block.
BEGIN greetings(); END;
/
Upvotes: 5