title: SQL delete all rows except some ones
body: <p>I have a table with the following columns (of urls):</p>
  
  <pre><code> [id,url,visited,timestamp]
   Types:[int,string,int,long]
  </code></pre>
  
  <p>I want to:</p>
  
  <p>Delete all urls except 10 unvisited priorizing higher timestamp (or delete all if all are visited for example)</p>
  
  <p>Its posible to do that in a single query? Anyway whats the best query (queries) for doing it?</p>
  
  <p>Thanks in advance</p>