A WHERE clause can define a condition for joining table rows, typically for a situation in which the values in a common column must match in both tables.
The following statement, which asks for the name of each employee from the employee table and the location of the department for each employee from the department table, is processed by joining the employee and department tables on the WHERE clause equality condition employee.dept_no=department.dept_no.
SELECT name, loc FROM employee, department WHERE employee.dept_no = department.dept_no;