Reputation: 4862
How to covert mysql query into mssql query?
SELECT name FROM user LIMIT 5, 10
I have known that mssql don't support 'limit'...
But I have to use limit
!
How to covert mysql query into SQL Server query?
Upvotes: 0
Views: 624
Reputation: 2080
select * from
(select name , ROW_NUMBER() over(order by name) rn from user ) a
where rn > 5 and rn<= 15
Upvotes: 1
Reputation: 6565
Try out this
SELECT * FROM (
SELECT *, ROW_NUMBER() OVER (ORDER BY name) as row FROM sys.databases
) a WHERE a.row > 5 and a.row <= 10
You can achieve your concept.
Upvotes: 2
Reputation: 32517
There is no way to translate this, but there is a bit of workaround here on SO. Check this out.
Upvotes: 0