如何判断statement插入是否成功

rows = statement.executeUpdate(sql);

if(rows>0){

  // 成功

}else{

 // 失败

}

你可能感兴趣的:(sql)