To search for related fields in reverse order in Supabase, you can use a JOIN statement with the ON condition in the opposite direction of the typical join condition. For example:
*
FROM table_a
JOIN table_b ON table_a.id = table_b.a_id
This query will return all data from both Table A and Table B that have a matching ID in Table A and a matching a_id in Table B.
To search in reverse order, you would use:
*
FROM table_a
JOIN table_b ON table_a.id = table_b.a_id
This query will return all data from both Table A and Table B that have a matching a_id in Table B and a matching ID in Table A.
Asked: 2023-05-10 22:03:42 +0000
Seen: 11 times
Last updated: May 10 '23