© 2026 Hedgehog Software, LLC

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

How do I write a simple join for these tables in v2

profiles
  user_id (pk)
  username 
  avatar_url
profiles
  user_id (pk)
  username 
  avatar_url


posts
  post_id (pk)
  user_id
  title
  description
posts
  post_id (pk)
  user_id
  title
  description


I want to just get do a select get every post along with the users profile who made the post, but I get error (400) when I try. Just returns null, but this is what the API section says to use.

let { data: posts, error } = await supabase
    .from('posts')
    .select('*, profiles(*)')
let { data: posts, error } = await supabase
    .from('posts')
    .select('*, profiles(*)')
unknown.png
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

How do I join tables containing multiple complex relation?
SupabaseSSupabase / help-and-questions
3y ago
How to optimize a simple join
SupabaseSSupabase / help-and-questions
4y ago
TS types incorrect for join tables
SupabaseSSupabase / help-and-questions
4y ago
How do I join tables that don't have a foreign key relationship with JS
SupabaseSSupabase / help-and-questions
3y ago