SimpleDB Limit Query - How to Limit Rows Returned in Query Results

Sometimes it is useful to limit the number of rows that are returned from a query. This can be especially useful when querying very large domains.

RazorSQL provides SQL support against the SimpleDB database. One of the options when writing SQL queries using RazorSQL to query SimpleDB is the limit syntax. Listed below are examples of limiting rows with the Amazon / AWS SimpleDB database using the RazorSQL SQL support:

Example 1: Returning the first 100 rows from the SimpleDB products domain: select * from products limit 100; Example 2: Returning the first 20 rows from the SimpleDB project domain: select * from project limit 20;

Many other databases also support limiting rows returned from queries. Listed below are links that show how to limit rows for other popular databases: