I am creating a PreparedStatement with SQL which have a like statement, and I am setting the placeholders using setString(), method, but it does not give any error or fetch any records. When I run the query direct at database by setting arguments in like statements then I get results, so I think there may be any other way to put place holders in sql, I am doing like below:
select name from employee where name like ?
I also tried:
select name from employee where name like (?)
and set parameters using setString() method but I did not get any results.
Please help what is wrong in it