title: Truncate a VARCHAR to specific length in Derby AUTOMATICALLY
body: <p>How can I truncate a VARCHAR to the table field length AUTOMATICALLY in Derby using SQL?</p>
  
  <p>To be specific:</p>
  
  <pre><code>CREATE TABLE A ( B VARCHAR(2) );
  INSERT INTO A B VALUES ('1234');
  </code></pre>
  
  <p>would throw a SQLException:</p>
  
  <pre><code>A truncation error was encountered trying to shrink VARCHAR '123' to length 2.
  </code></pre>
  
  <p>Is there a easy way to suppress this exception?</p>