SQL語句執行順序及MySQL中limit的用法

寫的順序:select ... from... where.... group by... having... order by..
執行順序:from... where...group by... having.... select ... order by...


MYSQL中:


寫的順序:select ... from... where.... group by... having... order by.. limit [offset,] (rows)
執行順序:from... where...group by... having.... select ... order by... limit


limit限制查詢的結果序號 
limit off, n: 從off偏移取n個數據
limit n: 取前n個數據,至關於limit 0, n
相關文章
相關標籤/搜索