Quantcast
Channel: SQL Windowing Functions: Are the results ordered? - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 3

SQL Windowing Functions: Are the results ordered?

$
0
0

If I have a window function which uses something like

SELECT *, row_number() OVER (ORDER BY something) FROM table

should the results be ordered?

I am currently testing out my queries in Microsoft SQL Server, and it certainly seems to be ordered, but I know that this product has the tendency to order rows when it hasn’t been asked.

Is this the standard behaviour?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>