Android – get the last row from SQLite database

I tried to get the last row from my SQLite database. Until now, I have tried max, SQL_ Sequence, but it doesn't seem to have any effect. I have to get the row value and assign it to class variables. Thank you for any help, because I'm a novice in SQLite and Android. Thank you

resolvent:

If you have obtained the cursor, this is how you get the last record from the cursor:

//Then use cursor to read the value

or

Do it like this

or

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>