title: Delete first N rows in android sqlite database
body: <p>Please let me know how to delete n-rows in android sqlite database. I used this code:</p>
  
  <pre><code>   String ALTER_TBL ="delete from " + MYDATABASE_TABLE +
           "where"+KEY_ID+"in (select top 3"+ KEY_ID +"from"+ MYDATABASE_TABLE+"order by _id );";
  
            sqLiteDatabase.execSQL(ALTER_TBL);
  </code></pre>
  
  <p>But it shows an error.</p>
  
  <pre><code>03-21 13:19:39.217: INFO/Database(1616): sqlite returned: error code = 1, msg = near "in": syntax error
  03-21 13:19:39.226: ERROR/Database(1616): Failure 1 (near "in": syntax error) on 0x23fed8 when preparing 'delete from detail1where_id in (select top 3_idfromdetail1order by _id );'.
  </code></pre>