title: Detect which SQL columns changed on UPDATE statement
body: <p>I have the following Java code:</p>
  
  <pre><code>PreparedStatement statement = conn.prepareStatement(updateString);
  statement.execute();
  </code></pre>
  
  <p>I know that after that is executed, doing <code>statement.getUpdateCount();</code> returns the number of updated rows. But, is there a way to know WHICH columns where updated?</p>
  
  <p>The problem is that the code as it is, always passes the whole set of column values, even if some of those values did not change. </p>
  
  <p><strong>I want to be able to tell whether a particular column, for example "NAME", changed or not, as a result of the underlying prepared UPDATE statement.</strong></p>
  
  <p><strong>EDIT</strong>: I understand that it is possible to do a SELECT for that column, get current value, and compare with incoming new value to detect if it will change. However, it implies another trip to the database. This question is to determine whether it is possible or not through some JDBC/SQL communication mechanism just after invoking that statement.</p>