Anil,
Just one scenario that can be taken from your exmaple in itself,where in you need to run select * statement on the same table with the same output in multiple places in your code such as
select * from emp where empno=?
select * from emp where empno=? and empname=?
If you use custom sql, you need create 2 adapter services, one with empno as input and the other with empno and empname as inputs.
But in case of dynamic SQL you can just write a statement in one variable like this:
select * from emp where ${whereclause}
and keep substituting ${whereclause} with “empno=1” and "empno=1 and empname=“xxx” and use only one adapter service.
This is one of them , it will be of good use if you need to update the same table based on various criteria because it gives you the flexbility to you, no need to create any fixed binding inputs.