简体   繁体   中英

How to get last/Bottom row of the table in Sqlite via Sql Query

I am trying to fetch the last row of my sqlite3 db. can anybody tell me the query syntax.

SELECT field
FROM TABLE
ORDER BY field DESC
LIMIT 1

assuming that ordering by DESC puts your last row first

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM