Skip to main content
Version: v2 RC

select()

Perform a SELECT on the query result.

By default, .insert(), .update(), .upsert(), and .delete() do not return modified rows. By calling this method, modified rows are returned in data.

const { data, error } = await supabase
.from('countries')
.upsert({ id: 1, name: 'Algeria' })
.select()

Parameters

  • columnsoptionalQuery

    The columns to retrieve, separated by commas

Examples

With upsert()

const { data, error } = await supabase
.from('countries')
.upsert({ id: 1, name: 'Albania' })
const { data, error } = await supabase
.from('countries')
.upsert({ id: 1, name: 'Algeria' })
.select()