Delete data: delete()

Performs a DELETE on the table.

const { data, error } = await supabase
.from('cities')
.delete()
.match({ id: 666 })

Parameters

  • __namedParametersrequiredobject

    No description provided.

      Properties
    • returningrequiredminimal | representation

      If true, return the deleted row(s) in the response.

    • countrequirednull | exact | planned | estimated

      Count algorithm to use to count rows in a table.

Notes

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

Examples

Delete records

const { data, error } = await supabase
.from('cities')
.delete()
.match({ id: 666 })