• rs.getxxx()后,可以用rs.wasnull判断获取的值是否为空。

    int id = rs.getInt(1);
    if( rs.wasNull( ) ) {
        id = 0;
    }