© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
nivekz

Delete row that has foreign key

I have 3 tables
Event
Users
Attending

The attending table has foreign keys to users and events and connects user id to event (when attending)

However some of these events need deleting and I can't do that until I manually delete entries from the attending table.

What I want is to delete entry in the events table, which would then in turn delete every entry in the attending table that matche event.id
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

Composite key foreign key issue
SupabaseSSupabase / help-and-questions
6mo ago
Cannot Delete Row
SupabaseSSupabase / help-and-questions
4mo ago
violates foreign key constraint
SupabaseSSupabase / help-and-questions
4y ago
Foreign Key Array Columns
SupabaseSSupabase / help-and-questions
4y ago