怎么从resultset 结果集中取出想要的字段值
1个回答
展开全部
用下面的语句就可以了吧
ResultSet resultSet = statement.executeQuery("select * from userinfo;");
while (resultSet.next())
{
String str_1 = resultSet.getString(1);
String str_2 = resultSet.getString(2);
String str_3 = resultSet.getString(3);
}
ResultSet resultSet = statement.executeQuery("select * from userinfo;");
while (resultSet.next())
{
String str_1 = resultSet.getString(1);
String str_2 = resultSet.getString(2);
String str_3 = resultSet.getString(3);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询