Prisma ORM

Lesson 09 · 10 min

Raw SQL, seeding, and test data

When Prisma's API isn't enough for a query, and how to fill the database for development.

10 minLesson 9 of 9Practice includedAsk AI on any point

For window functions, full-text search, or complex reports there's $queryRaw — a template string of SQL where ${…} becomes a query parameter, not text. $executeRaw runs a change and returns the number of rows. A seed is a script that fills the database with initial data: npx prisma db seed runs the command set in the Prisma configuration.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.