Update data
Perform an UPDATE on the table or view.
update()
should always be combined with Filters to target the item(s) you wish to update.
Parameters
- valuesREQUIREDRow
The values to update with
- optionsOptionalobject
Named parameters
countOptional"exact" | "planned" | "estimated"Count algorithm to use to count updated rows. `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the hood. `"planned"`: Approximated but fast count algorithm. Uses the Postgres statistics under the hood. `"estimated"`: Uses exact count for low numbers and planned count for high numbers.
const { error } = await supabase
.from('countries')
.update({ name: 'Australia' })
.eq('id', 1)