Discuss / Java / 交作业

交作业

Topic source

康208970

#1 Created at ... [Delete] [Delete and Lock User]

static String buildInsertSql(String s,String[] ta) {
StringBuilder sb = new StringBuilder();
sb.append("INSERT INTO ").append(s).append(" (");
for (int i = 0; i < ta.length; i++) {
sb.append(ta[i]);
if(i<ta.length-1){
sb.append(",");
}
}
sb.append(")VALUES(?<?<?)");
String str = sb.toString();
return str;

}

}


  • 1

Reply