Member-only story

Inner Join Example MySQL

Bipsmedium
2 min readSep 26, 2020

--

Before getting started with the inner join example MySQL, let’s know about the inner join keyword and its syntax.

What is inner join in SQL/MySQL?

Inner join is used when we want to collect the data or rows between two tables or from multiple tables in the database.

When the inner join is applied for two tables then it finds the exact matching values in both the tables. Once found, it returns all the matching data or rows from both the tables. Matching values are connected by columns that are related to each other in terms of the primary key and foreign key.

When the inner join is applied for multiple tables then it finds exact matching values in all the tables. Once found, it returns all the matching data or rows from all the tables. Matching values are connected by columns that are related to each other in terms of the primary key and foreign key.

Syntax:- (Two Tables)

select column name1,column name2,....... from table_name1 table_variable1 inner join table_name2 table_variable2 on table_variable1.matching column name = table_variable2.matching column name.

Syntax:- (Multiple tables)

--

--

Bipsmedium
Bipsmedium

Written by Bipsmedium

Hi, This is Biplab and I am a PHP laravel developer and other open source technologies. I am here to share my experience with the community.

No responses yet