數據查詢語言-DQL


數據查詢語言-DQL


表達式:

select 表達式|字段..

[from 表名 where 條件]

[group by 列名] [having 條件]

[order by 列名 [asc|desc]]

[limit 位置,數量]

select database();

select version();

select now();

分頁

limit n天數; 從第一條開始數n條數據

limit start 開始下標索引,count條數; 從起始位置start數count條數據(起始位置從0開始) ----推薦使用

分頁公式:

開始下標索引(起始位置) = (當前頁-1)* 每頁顯示條數;


分享到:


相關文章: