JavaScript: Delete data

Perform a DELETE on the table or view.

Parameters

Examples

Delete a single record

const response = await supabase
  .from('countries')
  .delete()
  .eq('id', 1)

Delete a record and return it

const \{ data, error \} = await supabase
  .from('countries')
  .delete()
  .eq('id', 1)
  .select()

Delete multiple records

const response = await supabase
  .from('countries')
  .delete()
  .in('id', [1, 2, 3])