我想在Microsoft SQL Server中創建虛擬列索引2005如何創建虛擬列索引在SQL Server
WITH OrderedOrders AS
(
SELECT *, ROW_NUMBER() OVER (ORDER BY I_D) AS RowNumber FROM ST_Agency_Tbl
WHERE Delete_Flag <> 1
)
SELECT * FROM OrderedOrders
WHERE RowNumber >= 8000000 AND RowNumber <= 8000100
我想在ROWNUMBER
不能添加索引到CTE ... –
我認爲你需要使用臨時表用於此目的 – brykneval