how to write parameterized sql query
My requirement is suppose if i have a table (Ex emp) with two fields name,id
my query is
select * from emp where id=01;
i want to enter id dynamically . when i run this query it needs to promt for id . based on the given id it should display the result.
Can any one help me in this regard.
Re: how to write parameterized sql query
You would declare a variable for "id", then assign a value to the variable. Then you would put the variable name in the query statement instead of the value.
The tool you are using should have help and examples. What does the help suggest?