int i;
ResultSet resultat = null;
resultat = statement.executeQuery("SELECT money FROM data WHERE id=1;");//for example the value of the field money in the row who has id=1
if(resultat.next()){ // you check if the query returned a value
i=resultat.getInt("money"); // the name of the column
}
1条答案
按热度按时间3okqufwl1#
现在您已经有了语句的示例,您可以这样做