Quantcast
Channel: Für Entwickler: SQL Server Forum
Viewing all articles
Browse latest Browse all 1772

offset n rows fetch next m rows only with dummy order by column - consistent results?

$
0
0

the "Offset n rows fetch m rows only" clause only works with an specified "order by" - which of course makes the query slower than without order.

My co-worker and me tried ordering by a constant:

select0as SORT_DUMMY, p.*fromtable p orderby1 Offset 0rowsfetch next 10 only

the command runs without Problems, however - I am not sure, if this would return the rows in a reproducable manner (we are using this for pagination).

Anybody has any insights on this?

Regards

Johannes Colmsee


Viewing all articles
Browse latest Browse all 1772

Trending Articles



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