No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
LIMIT
Use LIMIT to specify the maximum number of rows to return:
1SELECT fieldList
2FROM objectType
3[WHERE conditionExpression]
4 LIMIT number_of_rowsFor example:
1SELECT Name
2FROM Account
3WHERE Industry = 'Media' LIMIT 125This query returns the first 125 Account records whose Industry is Media.
You can use LIMIT with count() as the fieldList to count up to the maximum specified.
You can't use a LIMIT clause in a query that uses an aggregate function, but does not use a GROUP BY clause. For example, the following query is invalid:
1swfobject.registerObject("clippy.fail_agg_fn_limit_no_group_by", "9");SELECT MAX(CreatedDate)
2FROM Account LIMIT 1