"MySQL: DQL language learning _ paging query"

First, paging query

Scenario:

  Need to submit corresponding paging query based on the actual needs of users of web projects SQL statement
  data to be displayed when a display incomplete, paged through SQL requests submitted

grammar:

  SELECT field | expression, ...
  the FROM table
 [] connection types join Table 2
  the ON condition is connected
 [WHERE Filters]
 [GROUP BY packet field]
 [HAVING filters the packets]
 [ORDER BY sort column]
  LIMIT [offset ], size;

  
  starting offset index of the entries to be displayed (starting index starting from 0)
  the number of entries to be displayed size    

Features:

    1. The entries in the index starting from zero, if starting from 0, offset may be omitted.
    2.limit clause query on the last, in order of execution is final.

    3 formulas:

Guess you like

Origin blog.csdn.net/yexiangCSDN/article/details/104803164
Recommended