sql语句:
int startRow = (pageIndex - 1) * pageSize + 1; int endRow = pageIndex * pageSize; var sql ="select e.* from (select ROW_NUMBER() OVER(ORDER BY u.CreateTime DESC) AS Rownum,u.* from A as u where u.Status=0) as e WHERE e.Rownum BETWEEN " + startRow + " AND " + endRow;