Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.