Select from table where column data is shared
Hey all. Been grinding my head into the keyboard trying to solve this.
I have TableX that has two columns:
ID and userid
userid has a foreign key relationship to auth.users(id)
I have TableY that has three columns:
ID, userid, and firstname
userid has a foreign key relationship to auth.users(id)
I start off only having an ID for TableX. Is there a way to make a select query in the javascript api that allows me to retrieve the row in TableY that shares a userid with a given row in TableX?
Something like
supabase
.from('TableX')
.select(???)
.eq("id", someIDInTableX)
Hopefully this is clear. Thank you
I have TableX that has two columns:
ID and userid
userid has a foreign key relationship to auth.users(id)
I have TableY that has three columns:
ID, userid, and firstname
userid has a foreign key relationship to auth.users(id)
I start off only having an ID for TableX. Is there a way to make a select query in the javascript api that allows me to retrieve the row in TableY that shares a userid with a given row in TableX?
Something like
supabase
.from('TableX')
.select(???)
.eq("id", someIDInTableX)
Hopefully this is clear. Thank you
