Introduction
Hey Ninjas! As we all know, the Database is used to store information in the form of tables. And in MNCs, there are n numbers of tables in their databases. So have you ever thought about how these tables are being handled? If not, you are at the right place. Let's dive deep into this topic.

This blog will discuss the difference between equi join and natural join. But before moving to the main topic, let's first understand equi and natural join.
See more, loop and while loop
Equi Join
A join that is formed as a result of the equality condition between the two same columns of multiple tables is called an Equi join. This is also known as simple join. The comparison operator to denote the equi join is "=".
Syntax
The syntax of Equi join is as follows:
SELECT columnName (s)
FROM tableName1, tableName2, ...., tableNameN
WHERE tableName1.columnName = tableName2.columnName;
OR
SELECT columnName (s)
FROM tableName1
JOIN tableName2
ON tableName1.columnName = tableName2.columnName; Example
Let's take an example of this for better understanding. Suppose we have two tables named Student and Marks, as shown below.
Student Table:

Marks Table:

As you can see, the RollNo column is the same in both tables, so by following the syntax of equi join, we have
SELECT * FROM Student, Marks WHERE Student.RollNo = Marks.RollNo;
Output:

The output remains the same even if we use the other syntax. Let's have a look.
SELECT * FROM Student JOIN Marks ON Student.RollNo = Marks.RollNo;
Output:

If you notice in this example, the RollNo column is rendering twice because the equi join just merged both tables on the basis of the RollNo. To overcome this, we have the Natural Join. Let's have a look.





