SQL with multiple tables
Having some conceptual trouble here. I've got this SQL statement which so far works fine. I can type in a search term and it will check in People.name, People.emailAddress, and Company.name:
Companies ON People.id_Company = Companies.id
LOWER(People.name) LIKE '%SEARCHTERM%'
LOWER(Companies.name) LIKE '%SEARCHTERM%'
LOWER(People.emailAddress1) LIKE '%SEARCHTERM%'
"; ""; "" )
I would also like to check another table that is related to People via a join table:
I'd like to be able to include instruments from the Instruments table when they are related to the person via the Played table. Confused as to how to add this to my current SQL query.
Thanks for any help!