SQL INNER JOIN
A INNER JOIN command is queries that combine data from more than 1 table.
INNER JOIN will need a joining condition or connecting column to display out the joined data. 1 joining condition needs when we want to join 2 tables. If more than 2 tables want to join together, more joining condition or connecting column needed.
A connecting column should have values that match easily for both tables. Connecting columns almost always have the same datatype. The value in the connecting columns are join compatible or can say that the value are come from the same general class of data.
SQL INNER JOIN syntax:
SELECT *FROM [TABLE 1] INNER JOIN [TABLE 2]
Letís say, we only want to join 2 tables below and display only PlayerName and DepartmentName
Table 1: GameScores
Table 2: Departments
The joining Condition will be DepartmentId of both tables.
SELECT PlayerName, DepartmentName