Sqllite (Websql) How to sort and page queries (Sqllite syntax)

Source: Internet
Author: User

SELECT * from Table ORDER by ID DESC Limit 10,9

Limit semantics: Skip 10 lines and take 9 rows

Reference:

SQLite limit Usage If I'm going to 11-20 of the Account table data Select * From account Limit 9 Offset 10; The above statement means getting data from the account table, skipping 10 rows, taking 9 rows well, I think this feature is enough for many web medium-sized websites to use this. You can also write a select * from the account limit10,9 with the same effect as above. General public beta: sql = "SELECT * from Flycrocodile where" + conditions + "ORDER BY" + sort + "limit" + how many records to display + "offset" + how many records to skip; for example, select * from F Lycrocodile limit offset 20 means: Skip 20 records from the Flycrocodile table and select 15 Records. This article turns from: Http://blog.csdn.net/xiaoguang44/article/deta ils/8211676

Sqllite (Websql) How to sort and page queries (Sqllite syntax)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.