I have one question regarding make dynamic query with JdbcTemplate.
My code is as below :
String insertQueries = \"INSERT INTO \" + tablename;
StringJoi
**StringJoiner joiner2 = new StringJoiner(",", "(", ")");**
while (mapIterator.hasNext()) {
//change in value1 as
value = "\"" + (String) mapEntry.getValue() + "\"";
value1 = joiner2.add(value);
myvalue = joiner2.add("?");
}
//change insertQueries as with value as (? ,?)
insertQueries += " VALUES "+ myvalue+"" ;
//get value1 as ("abc", "xyz")
//update query as
int row = jdbcTemplate.update(insertQueries, value1);