我该怎么做才能Rowss
在WHERE
子句中使用名称?
SELECT TOP 10
ROW_NUMBER() OVER(ORDER BY dp.IdPytanie) AS Rowss,
dp.IdPytanie
,dp.SpecjalnePytanie
FROM dodajtemat_pytanie dp
WHERE
(@RowBegining = 0 OR convert(int,Rowss) >= @RowBegining)
AND (@RowEnd = 0 OR Rowss <= @RowEnd)
错误
这项工作->
@RowEnd = 0 OR ROW_NUMBER() OVER(ORDER BY dp.IdPytanie) <= @RowEnd