Insert data
Perform an INSERT into the table or view.
Parameters
- valuesREQUIREDobject
The values to insert. Pass an object to insert a single row or an array to insert multiple rows.
- optionsOptionalobject
Named parameters
countOptional"exact" | "planned" | "estimated"Count algorithm to use to count inserted 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')
.insert({ id: 1, name: 'Denmark' })