I've only just discovered that you can get rows for foreign keys doing this

SELECT f.*
    FROM firms f
        inner JOIN calls c
            ON f.id = c.firm_id group by c.firm_id;

that's fine where the foreign keys are from a single field in a single
table
(i.e. firm_id in calls)
but....
what if the foreign keys are from different flelds in different tables
all unioned together
i.e. id (only some of them) in the firms and firm_id in calls
What's the syntax for this?
Thank you in anticipation.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to