your_sql_query LIMIT number_of_records; If the number of records in the database for the query is less than the specified, then all those records would be fetched. 2. So, the first query I will try on this would be to fetch the first 10 rows (without even knowing the number of rows): MySQL SELECT TOP 10 FROM “StudentMarks” ResultSet: Result of selecting TOP 10 from “StudentMarks” Since we have only 9 records in the table, restricting the result set to 10 rows also retrieves 9 records only. Its basic syntax is: SELECT TOP number | percent column_list FROM table_name; Here, column_list is a comma separated list of column or field names of a database table (e.g. Note: Not all database systems support the SELECT TOP clause. The SQL TOP clause is used to limit the number of rows returned. The COUNT () function returns the number of rows in a group. The syntax of this in MySQL is: SELECT columns FROM table LIMIT offset, count; The COUNT (*) function returns a number of rows in a specified table or view that includes the number of duplicates and NULL values. (Pagination) Published in Friday 13th 2004f February, 2004 at 01:34 AM By Saleh Jamal : This is one of the most asked question I've ever seen in dev communitie