Here you can find the source of getColunmNames(ResultSetMetaData rsmd)
private static String getColunmNames(ResultSetMetaData rsmd) throws SQLException
//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(); } }