1

最近我读了这篇文章 http://www.mikesdotnetting.com/Article/150/Web-Pages-Efficient-Paging-Without-The-WebGrid 但我的问题是那篇文章使用 sql server ce 但我使用的是 MS sql server 而我想写这段代码:

sql = "Select Title, ISBN, Description, FirstName, LastName, Category From Books " + 
       "Inner Join Authors on Books.AuthorId = Authors.AuthorId " + 
       "Inner Join Categories on Books.CategoryId = Categories.CategoryId " +
       "Order By BookId OFFSET @0 ROWS FETCH NEXT @1 ROWS  ONLY;";

var result = db.Query(sql, offset, pageSize);

现在对于“Order By BookId OFFSET @0 ROWS FETCH NEXT @1 ROWS ONLY;”的相同查询是什么?在 sql server 中,如果您知道另一篇文章以另一种方式执行此操作,那也很好,非常感谢你们

4

0 回答 0