title: Apache Derby: how can I do "insert if not exists"?
body: <p>I'm giving <a href="http://db.apache.org/derby/" rel="noreferrer">Apache Derby</a>, aka <a href="http://developers.sun.com/javadb/" rel="noreferrer">JavaDB</a> a spin.  I can't seem to get around duplicate key issues when inserting records that may already exist.  Is there a Derby equivalent to "<code>insert if not exists</code>", or "<code>merge</code>" ?  </p>
  
  <p>Similarly, is there a way to do something like "<code>drop table foo if exists</code>"?</p>