faster way to limit records between range in sql server -
I have a large number of records in my table, and I want a record page between the boundaries, but for that Select only one solution near
with data (select ID, your column, ROW_NUMBER () as per the order (as ordered by your table) as the rhonam) * From the data from where roaming Between 5 and 10 But for that we need an external query and this is twice We will be killed on ours, like we can do in mysql like
select * from employee limit 2,4 there is no way that we You can get records between the range with a single hit. Bcoz If this is the problem, then we can not get the fast result of that question in MSSQL
One
- Leave the first 5 records and display the next 5 records Top 5 * From the data where the id is not If you have Microsoft SQL Server 2012 : id select the table name by order 10 for the next 10 races;
offset - & gt; # Of left rows
Next - & gt; Requirements for the next rows
Comments
Post a Comment