Java SQL ResultSet Print printValues(final ResultSet resultSet)

Here you can find the source of printValues(final ResultSet resultSet)

Description

print Values

License

Apache License

Declaration

public static void printValues(final ResultSet resultSet) throws SQLException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.ResultSet;

import java.sql.SQLException;

public class Main {
    public static void printValues(final ResultSet resultSet) throws SQLException {
        while (resultSet.next()) {

            for (int i = 1; i < resultSet.getMetaData().getColumnCount(); i++) {

                System.out.print(resultSet.getString(i));
                System.out.print("\t");
            }/* w w  w. j a va2s .co  m*/

            System.out.println("\n");
        }
    }
}

Related

  1. printResultSetRow(ResultSet rs)
  2. printResultsToFile(ResultSet rst, File outFile)
  3. printRow(ResultSet pk)
  4. printRsetTypeAndConcurrencyType(ResultSet rset)
  5. printSet(ResultSet set, int columns)
  6. printView(ResultSet rs)
  7. printWarnings(ResultSet resultSet)