Sqlite - No Such Column Error while deleting table from sqlite_sequence

前端 未结 3 2065
悲哀的现实
悲哀的现实 2021-01-27 22:27

I am trying to clear a table that has autoincrement key.

I am trying to do the following, by i get an exception.

protected void clearSqliteSequenceTable         


        
3条回答
  •  忘掉有多难
    2021-01-27 23:00

    Your "where" statement of

     name = business
    

    tries to delete from the table sqlite_sequence where the name column equals a hypotheticalbusiness column. If you are trying to delete from sqlite_sequence where the name column contains the value "business", try

    String query = "DELETE FROM sqlite_sequence WHERE name = 'business'";
    

提交回复
热议问题