Basic Select in Drizzle ORM

From the Drizzle ORM cheat sheet · Select Queries · verified Jul 2026

Basic Select

Select all or specific columns from a table.

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

// Select all columns
const allUsers = await db.select().from(users);

// Select specific columns
const names = await db.select({
  id: users.id,
  name: users.name,
}).from(users);
💡 Empty select() returns all columns typed
⚡ Partial select returns only chosen columns
📌 Use sql tag for raw SQL expressions
🟢 selectDistinct() for unique value queries
selectquerycolumns

Continue with Drizzle ORM

Save the full cheat sheet or work through every related task.

More Drizzle ORM tasks

Back to the full Drizzle ORM cheat sheet