Joins and Wasps.

Today in dat we were terrorised by mutiple deadly wasps, we may never be the same

also, we discussed Joins.

Joins are a select modifier that allows the developer and viewer to view infomation from mutiple different tables in the same query.

Here’s some example code.

 

Use adventureworks2008br2;
Go
Select e.buisnessidentiy.id
From humanresources.employee as e
Inner join sales.salesperson as s
On e.buisnessentityID = s.buisnessentityid

USE adventureworks2008br2
GO
SELECT distinct pl.productid, pl.listprice
From production.product p1
INNER JOIN production.product p2
ON pl.productsubcatagoryID =p2.productsubcatagoryID
And pl.listprice <> [2.listprice
Where pl.listprice < $15 and p2.listprice <$15
Order by productsubcatagoryID;

Inner and outer joins SQL examples and the Join block

 

I’ve also laid out what i’m going to be doing with milestone one and will be doing some use case today.

Leave a comment