遍历ResultSet结果集

public static void main(String argv[]){ Connection conn=null; conn=connect(); try { Statement statement = conn.createStatement(); String sql = "select * from user"; ResultSet rs = statement.executeQuery(sql); while(rs.next()){ for(int i=0; i

ResultSet的getMetaData()之后的getColumnCount()方法能够得到当前一条记录集的长度

    推荐阅读