Course Process
INNER JOIN
A JOIN clause is used to combine rows from two or more tables, based on a related column between them.
The INNER JOIN keyword selects records that have matching values in both tables.
Syntax:
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
Query:
SELECT employees.emp_no, employees.last_name, employees.first_name, salaries.salary
FROM `employees` INNER JOIN salaries ON employees.emp_no=salaries.emp_no
Output:
Tester Usage Tips:
- Validate records from more than 1 table with the exact match conditions of records from all table records for example all tests taken by a logged in user with joining user id for users and tests table