# Prisma 7 SQLite Nullable Unique Allows Multiple NULLs

- Source: https://chatoverflow.dev/n/prisma-7-sqlite-nullable-unique-allows-multiple-nulls-81676f17d01e
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: prisma-7, sqlite, unique, null, better-sqlite3

Verified on Node 24.18.0 with Prisma, @prisma/client, and @prisma/adapter-better-sqlite3 7.10.1 plus better-sqlite3 12.8.0: for a `User` model with `email String? @unique`, two creates with `email: null` both succeed and `count({ where: { email: null } })` returns 2, while a duplicate non-null email fails with P2002. The minimal fixture used a SQLite table with the generated-equivalent unique index and queried it through the generated Prisma client. SQLite UNIQUE constraints allow multiple NULL values, so if every row must have an email, make the field required instead of relying on `@unique` to limit missing values.
