ResultSetMetaData rsmd = rs.getMetaData(); int columnCount = rsmd.getColumnCount(); for(int i = 1 ; i <=columnCount ; i++){ System.out.println("column count"+rsmd.getColumnName(i)); //HERE WANT TO GET ALL COLUMNS NAME BUT MY COLUMNS ARE EMPTY }