Limit the number of rows returned
Limit the query result by count
.
Parameters
count
REQUIRED
numberThe maximum number of rows to return
options
Optional
objectNamed parameters
foreignTable
Optional
stringDeprecated, use `options.referencedTable` instead
referencedTable
Optional
stringSet this to limit rows of referenced tables instead of the parent table
const { data, error } = await supabase
.from('countries')
.select('name')
.limit(1)