Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’2mo agoβ€’
7 replies
V3RT1G0

JS SDK - UNION ALL

🟑javascript🟒SQL
Hello,

How do I write UNION/INTERSECT operations in JS SDK? AFAIK there's workarounds with matviews and RPC, but that would be a pain if I want to dynamic join that with another table. Or I would query two times, and have headache with pagination.

I want a specific solution like this:
  let query = supabase
    .from('Company_Offers UNION ALL Specialist_Offers')
    .select('id, name, Categories(id, name)', { count: 'exact' });
  let query = supabase
    .from('Company_Offers UNION ALL Specialist_Offers')
    .select('id, name, Categories(id, name)', { count: 'exact' });
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

Order by in js sdk
SupabaseSSupabase / help-and-questions
4y ago
SQL command instead of js sdk
SupabaseSSupabase / help-and-questions
4mo ago
JS SDK query call produces different results
SupabaseSSupabase / help-and-questions
4mo ago
Supabase JS SDK fetching incorrect info somehow?
SupabaseSSupabase / help-and-questions
3y ago