Java SQL Table Column getColunmNames(ResultSetMetaData rsmd)

Here you can find the source of getColunmNames(ResultSetMetaData rsmd)

Description

get Colunm Names

License

Apache License

Declaration

private static String getColunmNames(ResultSetMetaData rsmd) throws SQLException 

Method Source Code

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

import java.sql.ResultSetMetaData;
import java.sql.SQLException;

public class Main {

    private static String getColunmNames(ResultSetMetaData rsmd) throws SQLException {

        StringBuilder columnNames = new StringBuilder(64);

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

            columnNames.append(rsmd.getColumnLabel(i));
        }/*ww w.jav  a  2 s.  c o m*/

        return columnNames.toString();
    }
}

Related

  1. getColumnType(ResultSetMetaData rsmd, int idx)
  2. getColumnTypes(ResultSet rs)
  3. getColumnValue(ResultSet rs, ResultSetMetaData rsmd, int colIndex)
  4. getColumnValue(String column, String defaultValue, Map columnIndexMap, ResultSet res)
  5. getColumnValueFromResultSet(int columnIndex, int argType, ResultSet rs)
  6. getIndexColumns(Connection connection, String schema, String table, String indexName)
  7. getIndexName(Connection conn, String table, String column)
  8. getRange(Connection C, String table, String column)
  9. hasColumn(final ResultSet row, final String columnName)