Search
Star
Feedback
Setup for Free
Β© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Unable to create a check constraint for NaN values - Drizzle Team
DT
Drizzle Team
β’
15mo ago
β’
4 replies
josh_anderson_ftw
Unable to create a check constraint for NaN values
I am working to prevent any chance of NaN from being inserted into my DB
, so I created a check constraint that looks like the following
:
(table
)
=
>
[
check
(
"fancy
_check
_name
"
, sql
${table.amount} <> NaN
${table.amount} <> NaN
)
,
]
,
When I run drizzle
-kit
's push method
, I get the following error
,
"error
: column
"nan
" does not exist
"
Any combination of quotes or anything around NaN makes no difference
.
Any Ideas
?
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Is there a way to create check constraint?
DT
Drizzle Team / help
3y ago
How to implement a 'check' constraint
DT
Drizzle Team / help
3y ago
Check Constraint Workaround
DT
Drizzle Team / help
3y ago
Check Constraint not working?
DT
Drizzle Team / help
3y ago