Hi ilikeoracle,
hope this helps...
undefine dno;
Regards.
Main Topics
Browse All TopicsCan Anyone Help Me In Clearing The Values Within Substitute Variable For A Session :
Ex :
Select * From Emp Where Deptno = '&&Dno';
This Will Prompt To Enter The Value For Deptno. Lets Assume User Enters Value 20.
The Above Command Will Give Employee Details Belonging To Dept 20.
Now, Again When The Same Query Is Executed, It Should Prompt To Renter The Value For Deptno. But Its Not.
If We Terminate The Session & Re-Execute The Above Command It Prompts For The Value.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: adixitPosted on 2004-05-30 at 23:38:44ID: 11194581
accept Dno prompt " Please enter the department ID: "
---------- ---------- ---------- ---------- ---------- ----
Select * From Emp Where Deptno = '&&Dno';
--------------------------
1. & means it will prompt you for the value and use it oinly once .
eg insert into .... values ( .... , '&name',&rno);
if you execute it ,it will prompt you for values of name and rno . ( name is char /vrachar type notice the '' and rno is numeric.
when you execute it next tim,e over it will AGAIN prompt you for the values .
2. && means it will prompt you for the value once and keep the values for the varibables till you explicitly unset them or use a different session eg if you replace & with && in the above example it will prompt for the values of name and rno first time over , and will use the same values for the supsequent executions till you explicitly unset the variable or log out and log in again.