java rs结果集取值问题
Connectionconn=null;Statementstmt=null;ResultSetrs=null;Stringsql="selectcount(*)from...
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
String sql ="select count(*) from t_RndPwd where RndPwd_IsAvailability=0";
try{
conn = ConnectionPool.getConnection();
stmt = (Statement) conn.createStatement();
rs = (ResultSet) stmt.executeQuery(sql);
假如执行sql语句后的结果为8.那么请问我怎么从rs中取到8呢??谢谢
明白 展开
Statement stmt = null;
ResultSet rs = null;
String sql ="select count(*) from t_RndPwd where RndPwd_IsAvailability=0";
try{
conn = ConnectionPool.getConnection();
stmt = (Statement) conn.createStatement();
rs = (ResultSet) stmt.executeQuery(sql);
假如执行sql语句后的结果为8.那么请问我怎么从rs中取到8呢??谢谢
明白 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询