Modify data: update()

Performs an UPDATE on the table.

const { data, error } = await supabase
.from('cities')
.update({ name: 'Middle Earth' })
.match({ name: 'Auckland' })

Parameters

  • valuesrequiredPartial

    The values to update.

Notes

  • update() should always be combined with Filters to target the item(s) you wish to update.

Examples

Updating your data

const { data, error } = await supabase
.from('cities')
.update({ name: 'Middle Earth' })
.match({ name: 'Auckland' })