我的请求如下所示
SELECT SUM(quantity) FROM table1 t1
WHERE t1.x = 723834 AND t1.y = 0
UNION ALL
SELECT SUM(quantity2) FROM table t2
WHERE t2.x = 723834 AND t2.y > 0
UNION ALL
SELECT nombre FROM table3
WHERE rownum=1
当我在GUI上查看查询结果时,是这样的:
SUM(quantity)
20
4
30
public Transit mapRow(ResultSet rs, int rowNum) throws SQLException {
Double ql=rs.getDouble(1);
rs.next();
Double qe=rs.getDouble(1);
rs.next();
return Transit.builder().qteLivree(ql).qteExpediee(qe)
.nombreJoursOuvrables(rs.getInt(1))
.build();
}
另外,我想知道有没有其他方法可以检索而不使用下一个()凭什么我得不到好的价值观