|
对啊,有prepareStatement的可以实现的,例如:
pstmt1 = conn.prepareStatement(
"select count(1) from lottery_js where no1=? or no2=? or no3=? or no4=? or no5=? or no6=? or no7=?" ;
pstmt1.setInt(1,i);
pstmt1.setInt(2,i);
pstmt1.setInt(3,i);
pstmt1.setInt(4,i);
pstmt1.setInt(5,i);
pstmt1.setInt(6,i);
pstmt1.setInt(7,i);
rset=pstmt1.executeQuery(); |
|