Insert Rows in Drizzle ORM

From the Drizzle ORM cheat sheet · Insert / Update / Delete · verified Jul 2026

Insert Rows

Insert single or multiple rows with optional returning clause.

typescript
// Insert single row
await db.insert(users).values({
  name: 'Alice',
  email: 'alice@example.com',
});

// Insert with returning
const [newUser] = await db.insert(users).values({
  name: 'Bob',
  email: 'bob@example.com',
}).returning();
💡 .returning() is PostgreSQL and SQLite only
⚡ Bulk insert with array of values is efficient
📌 Defaults are applied automatically by the DB
🟢 Destructure the array to get a single result
insertreturningbulk

More Drizzle ORM tasks

Back to the full Drizzle ORM cheat sheet