我有一个这样的选择
SELECT
TOP (5)
ROW_NUMBER() OVER(ORDER By S.Id) AS RowNumber
,S.SubscribeNumber AS SN
FROM billing.Subscribe AS S
ORDER BY S.Id
有输出像这样
RowNumber SN
-------------------- --------
1 01100017
2 01100025
3 01100033
4 01100041
5 01100050
(5 row(s) affected)
我还有另一个选择 像这样
SELECT
ROW_NUMBER() OVER(ORDER By S.Id) AS RowNumber
,S.SubscribeNumber AS SN
FROM billing.Subscribe AS S
ORDER BY S.Id
OFFSET (5) ROWS
FETCH NEXT (5) ROWS ONLY;
有输出像这样
RowNumber SN
-------------------- --------
6 01100068
7 01100076
8 01100084
9 01100092
10 01100106
(5 row(s) affected)
我如何将所有两个联合起来选择并获得这样的结果
RowNumber Sn
-------------------- --------
1 01100017
6 01100068
2 01100025
7 01100076
3 01100033
8 01100084
4 01100041
9 01100092
5 01100050
10 01100106
(10 row(s) affected)