Over a million developers have joined DZone.

Simulate A (mysql)LIMIT On "MS SQLserver"

DZone's Guide to

Simulate A (mysql)LIMIT On "MS SQLserver"

Free Resource
return lines from 7995 to 8000 (5 lines)

select * from (
select top 5 * from 
(select top 8000 * from TABLE order by 1 asc) as tbl1 order by 1 desc 
) as tbl2 order by 1 asc

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}