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

JOIN Multiple Tables simple Question NEWBIE

$
0
0
Here is code that describes a simple multi table JOIN. I am new to T-SQL and wanted to confirm the logic of this code. SELECT product_name, vend_name, prod_price, quantityFROM orderitems, products, vendorsWHERE products.vend_id = vendors.vend_idAND orderitems.prod_id = products.prod_idAND order_num = 20005;Why is there not a table qualifier with the last WHERE filter ie "order_num =2005;" should this be "orderitems.order_num =2005;" or "products.order_num=2005;"?

Viewing all articles
Browse latest Browse all 3145

Trending Articles