String sqlStatement = "select * from employee where emp_no>=? and emp_no <= ? ";//写一个sql语句
pst = con.prepareStatement(sqlStatement); //放到数据库连接里
pst.setInt(1,low_no);//传递第一个问号的值
pst.setInt(2,high_no);//传递第二个问号的值
ResultSet rset = pst.executeQuery(); //执行查询
pst = con.prepareStatement(sqlStatement); //放到数据库连接里
pst.setInt(1,low_no);//传递第一个问号的值
pst.setInt(2,high_no);//传递第二个问号的值
ResultSet rset = pst.executeQuery(); //执行查询
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货