Home >Database >Mysql Tutorial >How to write an inner connection in mysql
Connections are divided into: inner joins, outer joins, and cross joins. Today we will learn how to use MySQL to establish an inner connection.
#Inner join definition: Only the rows in the two tables that meet the join conditions are combined as the result set.
Keywords: INNER JOIN
select * from employees e inner join department d on e.employee_id = d.department_id where e.employee_id = "1";
is equivalent to
select * from employees e,department d where e.employee_id = d.department_id and e.employee_id = "1";
The above is the detailed content of How to write an inner connection in mysql. For more information, please follow other related articles on the PHP Chinese website!