Sqlite - No Such Column Error while deleting table from sqlite_sequence

前端 未结 3 2060
悲哀的现实
悲哀的现实 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 22:47

    Just modify your query

    from

    String query = "delete from sqlite_sequence where name = business";
    

    to

    String query = "delete from sqlite_sequence where name = \'business\' ";
    

    I have tried its working fine :-)

提交回复
热议问题