本文介紹了MySQL 偏移無限行的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我想構建一個查詢,在一個表中顯示所有結果,但從表的開頭偏移 5.據我所知,MySQL 的 LIMIT
需要限制和偏移量.有沒有辦法做到這一點?
I would like to construct a query that displays all the results in a table, but is offset by 5 from the start of the table. As far as I can tell, MySQL's LIMIT
requires a limit as well as an offset. Is there any way to do this?
推薦答案
來自 MySQL 限制手冊:
從某一行中檢索所有行偏移到結果的末尾設置,您可以使用一些大數字第二個參數.這個說法從第 96 行檢索所有行到最后:
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:
SELECT * FROM tbl LIMIT 95, 18446744073709551615;
這篇關于MySQL 偏移無限行的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!