SQLIntermediate#joins

What is the difference between a natural join and an equi join?

An equi join states the equality condition explicitly in ON. A natural join implicitly joins on all identically named columns, which is concise but fragile when schemas change.

Example
-- equi join (preferred)
SELECT * FROM employees e JOIN departments d ON e.dept_id = d.dept_id;
-- natural join
SELECT * FROM employees NATURAL JOIN departments;

Related Questions

1
SQLBeginner#fundamentals

What is SQL?

Open
2
SQLBeginner#fundamentals

What is the difference between DBMS and RDBMS?

Open
3
SQLBeginner#ddl#dml

Difference between DELETE, TRUNCATE and DROP?

Open