Basic CRUD Operations in Supabase

From the Supabase cheat sheet ยท Database Operations ยท verified Jul 2026

Basic CRUD Operations

Create, Read, Update, Delete operations

typescript
// SELECT - Get data
const { data, error } = await supabase
  .from('posts')
  .select('*')

// INSERT - Create record
const { data, error } = await supabase
  .from('posts')
  .insert({ title: 'Hello', content: 'World' })

// UPDATE - Modify record
const { data, error } = await supabase
  .from('posts')
  .update({ title: 'Updated' })
  .eq('id', 1)

// DELETE - Remove record
const { error } = await supabase
  .from('posts')
  .delete()
  .eq('id', 1)
๐Ÿ“Š Automatic REST APIs from PostgreSQL
๐Ÿ”„ Chainable query methods
โœ… Always check for errors
โšก .select() returns inserted/updated data

More Supabase tasks

Back to the full Supabase cheat sheet