mercredi 3 février 2016

SQLite select from table based on other table

I have 2 tables, one is a list of companies and the other a list of products. The products are linked to a company in the column 'company_id'

To better understand, this is what I want to do:

SELECT * FROM Products WHERE company_id = (Company.id where name = Google)

What would be the correct way of writing this statement?

Aucun commentaire:

Enregistrer un commentaire