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!

Prompt in PL/SQL

605085Apr 3 2008 — edited Apr 3 2008
Hi

I'm using Oracle SQL Developer . I want to take input from the user and display it .

The user should be asked "Please enter your User ID"
I read about Prompt and accept from the blogs in the forum but still not being able to produce the prompt with the correct message .
The user id is a charater and I need to print it .But I'm getting some error . Please correct me .
I'm pasting the code which I had written

declare
ACCEPT USERID CHAR PROMPT 'PLEASE ENTER YOUR USER ID: '
Begin
USERID := '&USERID';
DBMS_OUTPUT.PUT_LINE(USERID);
END;


It is giving a prompt as USERID and when I put value into it there is an error .

Warm Regards
Rahul
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2008
Added on Apr 3 2008
3 comments
11,733 views