select
TOP 20 *
from
(select
TOP 30 *
from SavingRecurringMst_Kuber r, BhishiRegistrationMst b,
SavingRegistrationMst_Kuber s
where
RegID = FKRegID and
PkSavingRegID = FKSavinRegID ) as T
ORDER BY
Transactionate DESC
答案 0 :(得分:1)
试试这个......! 将起始索引和结束索引作为UI中的参数传递。
select SLNO, T.*
from (
select
ROW_NUMBER() OVER (ORDER BY Transactionate DESC) AS SLNO , SavingRecurringMst_Kuber.*
from SavingRecurringMst_Kuber r, BhishiRegistrationMst b,
SavingRegistrationMst_Kuber s
where
RegID = FKRegID and
PkSavingRegID = FKSavinRegID
) as T
where T.SLNO >= P_STARTINDEX and T.SLNO <= P_ENDINDEX