title: JDBC -- ResultSet values for column functions
body: <p>How to get the outcome of the query-- the AVG(DIST).  </p>
  
  <p>MySQL is showing this result under the column "AVG(DIST)"-- no other clue. </p>
  
  <p>How do i read this value from the <code>ResultSet</code> instance (<code>rs</code> in below code)?</p>
  
  <pre><code>PreparedStatement ps = c.prepareStatement("SELECT AVG(DIST) FROM POOL_TABLE");
  ResultSet rs = ps.executeQuery();
  </code></pre>
  
  <p><a href="http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html" rel="nofollow"><code>ResultSet</code></a> seems to be referring to them all by column names. </p>
  
  <p>Not well-familiar to JDBC -- yet!</p>
  
  <p>TIA. </p>