How To Join Multiple Tables Together In Sql Server 2008


show more Joining multiple tables together provides you with in-depth training on Business. Taught by Simon Allardice as part of the SQL Server 2008 Essential Training show less
please wait ...

Joining multiple tables together

After awhile you are going to find that be very straightforward SQL statements, like this one where I'm simply selecting three pieces of data from the Product table, well they don't get all that fantastically useful. What I'm retrieving here is the name of a product, the color of the product, and the ProductCategoryID, which in this case is 18 or 27 or 23, which is not all that helpful if I'm just reading this data. I want to know what the category is. Well I know that my database has the category stored in it but it's not in this table and here's why. I have got a simple diagram that's just showing these parts of this AdventureWorksLT database.

There is a Product table with all these columns in and then there a ProductCategory table and this is simply good normalization. We can have multiple products in category, so it's a good idea to take that category data out and put it in its own table. And what this really means for MySQL statement is I want one SQL...

Joining multiple tables together
Video duration: 8m 0s 6h 54m Beginner

Viewers:

Joining multiple tables together provides you with in-depth training on Business. Taught by Simon Allardice as part of the SQL Server 2008 Essential Training

Subjects:
Business Developer IT
Software:
SQL Server
Author:
please wait ...