How to get Last record from Sqlite?

前端 未结 12 2098
悲&欢浪女
悲&欢浪女 2020-12-02 07:37

I have a one table question_table and one ImageButton (Back). I need to get the last inserted record from the database after clicking on t

12条回答
  •  佛祖请我去吃肉
    2020-12-02 08:15

    Here's a simple example that simply returns the last line without need to sort anything from any column:

    "SELECT * FROM TableName ORDER BY rowid DESC LIMIT 1;"       
    

提交回复
热议问题