Search⌘ K

Solution to Exercise 2

Understand how to perform an INNER JOIN between tables to fetch related data and apply a WHERE clause to filter employee salaries within a specific range. Learn how to retrieve combined information from Employee and Salary tables for effective database queries.

We'll cover the following...

Solution #1

MySQL
SELECT E.FULL_NAME, S.SALARY
FROM EMPLOYEE AS E
INNER JOIN SALARY AS S
ON E.EMP_ID = S.EMP_ID
WHERE S.SALARY >= 40000 AND S.SALARY <= 60000

The solution will also work without using the aliases as seen below: ...