Can you call ROW_NUMBER () in dynamic sql and use Common Table Expressions in Dynamic Sql?
I want to limit the number of records returned by the ROW_NUMBER () call, but I'm curious if it can be called in dynamic sql?
Also, can you use CTEs in dynamic sql?
0
Xaisoft
source
to share
1 answer
Do you mean as opposed to calling from a stored procedure or other code object? If the question is, the answer is yes . Note to record that row_number is only supported in SQL 2005 and later.
+2
James orr
source
to share