© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
4y ago
•
3 replies
Max52
Only insert nullable column if not null
I
'm inserting a row into my threads table and I want to only include a reference to the categories table if the user selects a category
.
I
'd like to be able to just insert as usual
(
{category_id: category}
{category_id: category}
and if category is null
, the column stays null
. The issue is I get an error stating that it cannot be inserted as a uuid
. Thoughts
?
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Query for non-null values in a nullable column
S
Supabase / help-and-questions
3y ago
Only INSERT if reservation doesn't exist yet.
S
Supabase / help-and-questions
4y ago
Insert value into enum column in database
S
Supabase / help-and-questions
4y ago
Why is the created_at column nullable by default?
S
Supabase / help-and-questions
4y ago