Drizzle is an ORM for people who like SQL. Its queries mirror SQL closely, it adds no heavy runtime, and it infers types end to end — your editor knows your columns. Here's the workflow.
Define the Schema in TypeScript
import { pgTable, serial, text, timestamp } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
id: serial("id").primaryKey(),
name: text("name").notNull(),
email: text("email").notNull().unique(),
createdAt: timestamp("created_at").defaultNow(),
});Type-Safe Queries
import { eq } from "drizzle-orm";
const user = await db
.select()
.from(users)
.where(eq(users.email, "a@b.com")); // columns are autocompleted & typedMigrations with drizzle-kit
npx drizzle-kit generate # create SQL migrations from your schema
npx drizzle-kit migrate # apply themDrizzle vs Prisma
Choose Drizzle for SQL-like control, a tiny bundle, and edge runtimes. Choose Prisma for a richer client and a larger ecosystem. Both are excellent in 2026.
