-1
+-----------+-------------+
| attribute | score |
+-----------+-------------+
| camera | 0.0819958 |
| display | 0.327983 |
| model | 0.70521 |
| ram | 0.000304832 |
+-----------+-------------+
我希望根据得分的属性进行排序表,我想打印所有的人。但是当我执行下面的代码时,我只能得到一个值。请帮忙。
String tb = "SELECT attribute from qvtemp order by score desc ";
statement = con.getConnection().prepareStatement(tb);
ResultSet rs5 = statement.executeQuery();
String g = null;
while (rs5.next()) {
g = rs5.getString(1);
}
System.out.println(g);