Perform an UPDATE on the table or view.
By default, updated rows are not returned. To return it, chain the call with .select()
after filters.
update()
should always be combined with Filters to target the item(s) you wish to update.The values to update with
Named parameters
const { error } = await supabase
.from('instruments')
.update({ name: 'piano' })
.eq('id', 1)
const { data, error } = await supabase
.from('instruments')
.update({ name: 'piano' })
.eq('id', 1)
.select()
const { data, error } = await supabase
.from('users')
.update({
address: {
street: 'Melrose Place',
postcode: 90210
}
})
.eq('address->postcode', 90210)
.select()