Home > Database > Mysql Tutorial > How to write an inner connection in mysql

How to write an inner connection in mysql

little bottle
Release: 2019-05-29 16:35:01
Original
5110 people have browsed it

Connections are divided into: inner joins, outer joins, and cross joins. Today we will learn how to use MySQL to establish an inner connection.

How to write an inner connection in mysql

#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";
Copy after login

is equivalent to

select * from employees e,department d 
where e.employee_id = d.department_id and e.employee_id = "1";
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template