将在给定图像中获取Reminder1的最后日期的Java代码是什么。
这是我写的,但是它是错误的
StringBuffer sql = new StringBuffer("SELECT * FROM TITAN_PORTAL.Scorecard_Reminder whereStatus='Active'");
resultSet = stmt.executeQuery(sql.toString());
while (resultSet.next()) {
String reminder1 = resultSet.getString("Reminder1.Last_Date");
使用表alias
。以便更轻松地检索列名。
StringBuffer sql = new StringBuffer("SELECT * FROM TITAN_PORTAL.Scorecard_Reminder t1 whereStatus='Active'");
resultSet = stmt.executeQuery(sql.toString());
while (resultSet.next()) {
String reminder1 = resultSet.getString("t1.Last_Date");