title: Delete Duplicated Rows IN SQLITE using XCODE
body: <p>I am currently using Xcode to create and edit a SQLITE document.</p>
  
  <p>Currently i use the following syntax to input and delete duplicates in the database using didselectrowatindex in the uitableview . But it dosnt seem to be working.</p>
  
  <pre><code>NSString *sql = @"INSERT INTO RECENT ('NAME', 'TITLE', 'VIDEO', 'IMAGE', 'DESCRIPTION' ) VALUES (?,?,?,?,?);delete from RECENT where rowid not in (select max(rowid) from RECENT group by 'IMAGE');";`
  </code></pre>
  
  <p>what im trying to achieve is to add data to a sqlite database. If the data is already on the database then to delete this row and t ensuring that the most recent sits at the top of a uitableview.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>