Javascript Reference v1.0

Limit the number of rows returned

Limits the result with the specified count.

Parameters
    count
    REQUIRED
    number

    The maximum no. of rows to limit to.

    __namedParameters
    Optional
    object

const { data, error } = await supabase
  .from('cities')
  .select('name, country_id')
  .limit(1)