Inner Join in Drizzle ORM
From the Drizzle ORM cheat sheet · Joins · verified Jul 2026
Inner Join
Return rows that have matching values in both tables.
typescript
import { eq } from 'drizzle-orm';
const result = await db.select({
postId: posts.id,
postTitle: posts.title,
authorName: users.name,
}).from(posts)
.innerJoin(users, eq(posts.authorId, users.id));💡 innerJoin excludes rows with no match
⚡ Specify columns in select() to avoid clashes
📌 Join condition uses eq() like where clauses
🟢 Result type is inferred from selected columns
joininner-join