Skip to main content

LIMIT

For more details check Check SOQL API - LIMIT.

NOTE! 🚨 All examples use inline queries built with the SOQL Lib Query Builder. If you are using a selector, replace SOQL.of(...) with YourSelectorName.query().

Specify the maximum number of rows to return.

SOQL

SELECT Id
FROM Account
LIMIT 100

SOQL Lib

SOQL.of(Account.SObjectType)
.setLimit(100)
.toList();