I have private static final String SQL_SEARCH_ALL = "SELECT * FROM product WHERE name LIKE '%?%'"; SQL statement, where I need to pass a query String. When instead of ? mark I pass a string like '%cola%' it works fine.
I pass paramater using JdbcTemplate as I have used to
return jdbcTemplate.query(SQL_SEARCH_ALL, new Object[]{searchInput}, productRowMapper); That returns zero objects.
I have problem with passing value into this statement.
https://stackoverflow.com/questions/65556820/cannot-put-value-into-sql-statement-in-java-spring-boot January 04, 2021 at 10:00AM
没有评论:
发表评论