Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create minimal stored procedure?

user8816970Jan 16 2011 — edited Jan 16 2011
What is the preferred way of creating stored procedures? Can I use SQL Developer or SQLPlus?
I'm running version 11.2.0.1.0.

Here is my attempt in SQLDeveloper:

CREATE OR REPLACE PROCEDURE hello ()
BEGIN
dbms_output.put_line('Hello, World!');
END;

SET SERVEROUTPUT ON;
SELECT hello() from DUAL;

When I hit F5 it says

Warning: execution completed with warning
PROCEDURE hello Compiled.


When I select the last line and hit F9 I get a dialog box that says:

An error was encountered performing the requested operation:

ORA-00904: "HELLO" invalid identifier
00904.0000 - "%s: invalid identifier"
*Cause:
*Action:
Vendor code 904 Error at line:8 column 7

I tried using SQL plus but since I'm having trouble just logging in, I already posted my query in the SQLPlus forum.

Thanks,
siegfried
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2011
Added on Jan 16 2011
5 comments
617 views