Left / Right / Full Join in Drizzle ORM

From the Drizzle ORM cheat sheet ยท Joins ยท verified Jul 2026

Left / Right / Full Join

Return all rows from one or both tables, even without matches.

typescript
import { eq } from 'drizzle-orm';

// Left join โ€” all users, even without posts
const result = await db.select({
  userName: users.name,
  postTitle: posts.title, // nullable!
}).from(users)
  .leftJoin(posts, eq(users.id, posts.authorId));
๐Ÿ’ก Left join makes right-side columns nullable
โšก Chain multiple joins for complex queries
๐Ÿ“Œ Full join makes both sides nullable
๐ŸŸข Drizzle adjusts TS types per join type
joinleft-joinright-joinfull-join

More Drizzle ORM tasks

Back to the full Drizzle ORM cheat sheet