title: SQL query for for finding range between two numbers, to stop duplicates to enter
body: <p>I have a data in a table with two columns <code>from</code> and <code>to</code>, for example: <code>5-9</code>.</p>
  
  <p>If I insert a new row <code>1-6</code>, it should NOT be accepted, as <code>6</code> lies in between <code>5</code> and <code>9</code>.</p>
  
  <p><code>1-3</code> - should accept (no overlap), <code>10-13</code> - should also accept.</p>
  
  <p>I need a single query for this</p>