Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Joining Multiple Tables

$
0
0
Hello Forum,I have a quick concept question. Here is the code:[code]SELECT prod_name, vend_name, prod_price, quanityFROM orderitems, products, vendorsWHERE products.vend_id = vendors.vend_idAND orderitems.prod_id=products.prod_idAND order_num =20005;[/code]My question: I understand that we are linking the order.product_id to the products.prod_id. I also understand that we are relating the product.vend_id to the vendors.vend_id. My question is, since we are using the "products" table in both equi-joins, that how the 4 columns are a linked together?

Viewing all articles
Browse latest Browse all 3145

Trending Articles