SQL Joins
Joins are used in SQL when data from more than one table is required. Join combines rows from two or more tables based on common fields between them.
We should take some precautions while doing join operation :-
- If same column name appears in more than one table, the column name must be prefix with column name.
- Also in select statement, precede column name with the table name for clarification.
- Inner join
- Self join
- Outer join
Inner join
When equijoins and nonequijoins are performed, rows from the source and target tables are matched using a join condition formulated with equality and inequality operators, respectively. These are referred to as inner joins.