Types of joins : Inner joins , Non-equi Join, Natural Join, Right outer join
Inner Join
Returns only the rows where there is a match in both tables. Rows without a corresponding match in the other table are excluded.
SELECT * FROM a JOIN b ON a.id = b.a_id;
Non-Equi Join
A join whose condition uses an operator other than equals (such as <, >, or BETWEEN) — commonly used to match a value against a range, e.g. matching a salary to a salary grade table.
Natural Join
Automatically joins two tables on all columns that share the same name and data type, without needing to specify the join condition explicitly. Convenient, but risky if tables happen to share an unrelated column name.
Right Outer Join
Returns all rows from the right table, plus matching rows from the left table; unmatched columns from the left table appear as NULL.
SELECT * FROM a RIGHT OUTER JOIN b ON a.id = b.a_id;
Ready to master real-world software testing?
Learn manual and automation testing hands-on with mentor-led sessions.
.png)