title: mysql.jdbc exception outside valid range for the datatype INTEGER
body: <p>I am running into an error when I am trying to access the contents of database (<code>BIGINT</code>) from a Java file. I am not able to figure out the fix for this exception.</p>
  
  <p><strong>I am getting following error:</strong></p>
  
  <pre><code>com.mysql.jdbc.exceptions.jdbc4.MySQLDataException:
      '5.62949953421312E15' in column '1' is outside valid range for the datatype INTEGER.
  </code></pre>
  
  <p><strong>Java code:</strong></p>
  
  <pre><code>long  pID=0;
  
  SQLStatement = connection.createStatement();
  String Query101 = "select projectID from Project";
  ResultSet rs101 = SQLStatement.executeQuery(Query101);
  while (rs101.next()) {
      pID = rs101.getLong("ProjectId");
  }
  </code></pre>
  
  <p><strong>SQL code:</strong></p>
  
  <pre><code>CREATE TABLE Project (projectID bigint(20) Primary key) 
  </code></pre>
  
  <p>The value for <code>projectID</code> in the database table I am using is <code>5629499534213120</code>.</p>