title: In a JDBC ResultSet, what should happen when getLong() or getShort() is called on an int result column?
body: <p>Say that I have a JDBC ResultSet, and I call the getLong() or getshort() method. </p>
  
  <p>For which of the following SQL types {SMALLINT, INT, BIGINT} should I get long, and for which types should I get an error? </p>
  
  <p>In other words, if I have an INT and I want a SMALLINT (A short), would I get it, or would I get an error? Similarly, if I have an INT and want a BIGINT (a long), would I get it, or would I get an error? </p>
  
  <p>The Javadocs (listed below) say nothing. </p>
  
  <blockquote>
    <p>public long getLong(int columnIndex)
                 throws SQLException</p>
  
  <pre><code>Retrieves the value of the designated column in the current row
  </code></pre>
    
    <p>of this ResultSet object as a long in
    the Java programming language.</p>
  
  <pre><code>Parameters:
      columnIndex - the first column is 1, the second is 2, ... 
  Returns:
      the column value; if the value is SQL NULL, the value returned is 0 
  Throws:
      SQLException - if a database access error occurs
  </code></pre>
  </blockquote>