We know there are skip and take operators available in linq to skip and take
The Take operator is used to return a given number of rows from a object list and the Skip operator skips over a specified number of rows in object list.
var employee = (from emp in employeeContext.EMPLOYEEs
where emp.SALARY < 1300
Is there a way in MySQL to achieve the same like have the first 10 result from a SELECT query skipped and select next 10?
Answer : Yes we can use LIMIT with two parameter
Introduction to MySQL LIMIT clause
LIMIT clause is used in the
SELECT statement to constrain the number of rows in a result set. The
LIMIT clause accepts one or two arguments. The values of both arguments must be zero or positive integers.
The following illustrates the
LIMIT clause syntax with two arguments:
Let’s examine the
LIMIT clause parameters:
offsetspecifies the offset of the first row to return. The
offsetof the first row is 0, not 1.
countspecifies the maximum number of rows to return.
When you use the
LIMIT clause with one argument, this argument will be used to determine the maximum number of rows to return from the beginning of the result set.
Use LIMIT with two parameters. For example, to return results 11-60 (where result 1 is the first row), use:
SELECT * FROM foo LIMIT 10, 50