📜  结果集获取值 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:23.634000             🧑  作者: Mango

代码示例1
conn = DBConnection.connect();
    String SQL = "SELECT * from usertable";
    // ResultSet
    ResultSet rs = conn.createStatement().executeQuery(SQL);
    if (rs.next()) {
        System.out.println(rs.getString(1));
    }