SQL中的分页
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SQL中的分页相关的知识,希望对你有一定的参考价值。
Call it in the button click event after in(de)crementing CurrentPage value
DataTable dtAllProductsView = DB.GetData(@" SELECT TOP " + itemsNb + @" * FROM (SELECT ROW_NUMBER() OVER (ORDER BY id) AS RowNumber, * FROM [vwAllProductData] WHERE [" + promotion + @"] LIKE 'True' AND active = 'True' ) _rowNbResult WHERE RowNumber > " + CurrentPage + @" * " + itemsNb);
以上是关于SQL中的分页的主要内容,如果未能解决你的问题,请参考以下文章