By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,279 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,279 IT Pros & Developers. It's quick & easy.

Accepting user inputs in DB2 UDB? (Oracle & syntax)

P: 1
Hi All,

Do you have any idea about how to allow an user/person to input values in SQL queries

For e.g. Consider the following Oracle SQL statement:

select empname from emptable where empid='&empno'.

When u execute this query on Oracle, it asks the user to input value for empno.

How we can achieve this is DB2 ?

OR In simple words...

printf("Enter a number =");
scanf("%d", &number);

So how to achive this in DB2 UDB SQLs....I wanna to have dynamic queries..which will accept input from user and based on the value, it will select the appropriate records from tables.

Thanks in Advance !
gango
Oct 18 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.