How to pass list as parameter in SQL query
private static String sqlFormatedList(List<String> list){
StringBuilder sb = new StringBuilder();
sb.append("('");
for (String i : list){
sb.append(i+"','");
}
sb.deleteCharAt(sb.length() -1);
sb.deleteCharAt(sb.lastIndexOf(","));
sb.append(")");
return sb.toString();
}