database

How do I display the top 10 query results in MySQL?

Use the limit operator to reduce the number of results returned to be 10.

SELECT * FROM tbl LIMIT 10;

For example, select age, name from users where age>22 limit 10;

2 Comments

2 Comments

  1. mherzog

    July 10, 2010 at 3:48 pm

    Where “tbl” is the name of the table?

    • admin

      July 11, 2010 at 8:45 pm

      Yes, that’s correct.

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top