© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
2 replies
DanM

Set a column to null on update

Using supabase js how to I set a column to null when running an update. I tried the following and none worked.

subabase.from("address").update({"user_id", null}).eq("id", id)
subabase.from("address").update({"user_id", undefined}).eq("id", id)
subabase.from("address").update({"user_id", null}).eq("id", id)
subabase.from("address").update({"user_id", undefined}).eq("id", id)

The request complete successully but there in no change in the table. I believe this is due to update stripping out undefined and null props on update but I'm not sure. Any ideas how I do this.

Thanks
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Unable to update column value to null (supabase-js)
SupabaseSSupabase / help-and-questions
4y ago
How to update column in row on update trigger?
SupabaseSSupabase / help-and-questions
4y ago
[SOLVED] set update policy to update fields
SupabaseSSupabase / help-and-questions
5d ago
Query for non-null values in a nullable column
SupabaseSSupabase / help-and-questions
3y ago