public int doDelete(int [] id){
String sql ="delete from applyro where id in(";
for (int i =0;i<id.length;i++){
sql += id[i] +",";
}
sql = sql.substring(0,sql.lastIndexOf(","));
sql += ")";
//执行SQL语句.....略
}
这个方法拼接处的SQL语句似乎不争取,哪位大神帮忙改下????
String sql ="delete from applyro where id in(";
for (int i =0;i<id.length;i++){
sql += id[i] +",";
}
sql = sql.substring(0,sql.lastIndexOf(","));
sql += ")";
//执行SQL语句.....略
}
这个方法拼接处的SQL语句似乎不争取,哪位大神帮忙改下????