what is limit in mysql?

The LIMIT clause is used to specify the number of data rows to return. In large tables with thousands or millions of data rows, it takes some time to return all the records, which cause database performance issue. To fix this problem, we can return the specified number of data rows from a table.

SELECT * FROM ittutorial LIMIT 5;

limit with where condition

SELECT * FROM Employee WHERE City = ‘patna’ LIMIT 10;

limit with order by

SELECT * FROM Employee WHERE City = ‘patna’ ORDER BY Name ASC LIMIT 5;





Previous Next


Trending Tutorials




Review & Rating

0.0 / 5

0 Review

5
(0)

4
(0)

3
(0)

2
(0)

1
(0)

Write Review Here


Ittutorial