sql server常用语句
按时间查询最近的阶段并显示5条数据:select top 5 字段 from 表 order by 字段的时间 desc
分页的高效率的语句:SELECT *from
(SELECT Id, UserName, Age, Sex, IsVIP,row_number() over(order by id) rownum FROM dbo.T_USERS)t
where t.rownum>@startRowIndex and t.rownum<=@startRowIndex+@maximunRows
关注web前端