There are different kinds of joins like outer join, left join etc. It’s worth noting here that products_ordered.product_id is a foreign key to products.id. We need to tell SQLite how to join the other table, so we tell it to join “ON products_ordered.product_id = products.id” - meaning, if a row from the “products” table has the same ID as the “product_id” column in the “products_ordered” table then the two rows will be joined into one in the query result. ![]() ![]() Hence we include the keywords “INNER JOIN” to join the table “products_ordered”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |