Module 13 (Introduction to SQL - Part 2).pdf
Module 13 (Introduction to SQL - Part 2).pdf
Module 13 (Introduction to SQL - Part 2).pdf
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Using JOIN and WHEREIf, for example, we want <strong>to</strong> find out order his<strong>to</strong>ryfor only those employees earning $50,000/year,we can add this in the WHERE clause:SELECT *FROM Employees E INNER JOIN Orders OON E.EmployeeID = O.EmployeeIDWHERE E.Salary >= 50000ORDER BY E.Salary, O.Cus<strong>to</strong>merID