MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
     
13
   
2017
Months
Nov


Mon, Nov 13, 2017 11:20 pm

Limit number of records displayed in SQL output

If you have a lot of records in a table in a MySQL, MariaDB, etc. database that are returned when you use the SQL SELECT command to query for matching records, the results may scroll by so that you can't see the initially returned rows. You can limit the number of rows displayed by appending LIMIT n at the end of the command where n is the number of records you want to see at a time. E.g., if I had 100 records in a table named Sales, but wanted to page through them 10 records at a time, I could use SELECT * FROM Sales LIMIT 10; or, if I just wanted to view one field/column in the table, e.g. "Description", I could use SELECT Description FROM Sales LIMIT 10;

[/software/database/sql] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo