Home>

I want to perform fuzzy search using bind variables

For example
public List<○○>There is a method like searchByName(String keyword) {}.
In this {}, connect to the DB (postgresql this time),

String sql = SELECT * FROM people WHERE name LIKE %?%;
I want to execute the SQL statement with executeQuery(). (Enter the keyword of the argument in?)

But I get an error. Perhaps I don't think? Is recognized as a bind variable...

Please teach if you know how to do it.

Language: Java (ver.8)
Development environment: eclipse