- What is a JOIN?
A JOIN combines rows from multiple tables. - What is INNER JOIN?
Returns matching rows from both tables. - What is LEFT JOIN?
Returns all rows from left table and matching rows from right. - What is RIGHT JOIN?
Returns all rows from right table and matching rows from left. - What is FULL OUTER JOIN?
Returns all matching and non-matching rows from both tables. - What is CROSS JOIN?
Returns Cartesian product of both tables. - What is SELF JOIN?
A table joined with itself. - Difference between INNER and LEFT JOIN?
INNER returns matches only; LEFT returns all left rows. - What happens if no match in LEFT JOIN?
NULL values are returned for right table columns. - What is Cartesian product?
Every row from first table joins with every row from second. - Can we join more than 2 tables?
Yes, multiple joins are allowed. - Which join is used to find unmatched records?
LEFT JOIN withWHERE right_table.id IS NULL. - Scenario: Find customers with no orders.
Use LEFT JOIN between customers and orders, filter NULL orders. - Scenario: Get employee with manager name.
Use SELF JOIN on employee table. - Can we join tables without primary key?
Yes, using common columns.
A blog about basic database questions. It has all the important database terms and their simple explanation, easy to remember. Most of the database terms asked in the interviews like what is DBMS, what is Tuple in database , Data Modelling.
Thursday, May 14, 2026
Joins (36–50)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment