Skip to main content
Version: v2 RC

range()

Limit the query result by from and to inclusively.

const { data, error } = await supabase
.from('countries')
.select('name')
.range(0, 1)

Parameters

  • fromrequirednumber

    The starting index from which to limit the result

  • torequirednumber

    The last index to which to limit the result

  • optionsrequiredobject

    Named parameters

      Properties
    • foreignTableoptionalstring

      Set this to limit rows of foreign tables instead of the current table

Examples

With select()

const { data, error } = await supabase
.from('countries')
.select('name')
.range(0, 1)