You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# G-3185: Never use ROWNUM at the same query level as ORDER BY.
2
+
3
+
!!! warning "Major"
4
+
Reliability, Testability
5
+
6
+
## Reason
7
+
8
+
The `rownum` pseudo-column is assigned before the `order by` clause is used, so using `rownum` on the same query level as `order by` will not assign numbers in the desired ordering. Instead you should move the `order by` into an inline view and use `rownum` in the outer query.
0 commit comments