title: Insert BLOB using java for both DB2 and Oracle
body: <p>I am currently validating an application developed on Oracle for DB2. Since we don't want to maintain two separate sources, I need some query to insert blob into a field, that works in both oracle and db2. I don't have any identifier to distinguish under which DB the application is running.</p>
  
  <p>I used <code>utl_raw.cast_to_raw</code>  in oracle and <code>CAST() as BLOB</code> in DB2 which are mutually incompatible.</p>