I have my speculations that it is because the results of ROW_NUMBER are applied after the rows are selected and filtered, but I'd like something definitive.
Thanks a bunch in advance.
That would be the exact reason. The ROW_NUMBER function numbers output rows, so if you used it in the WHERE it would have to ignore rows that would not meet the criteria to be output.
Otherwise if it applied at the FROM level, there might be gaps in the sequence.
|||Louis,Thank you very much for the answer.
No comments:
Post a Comment