Why is the basic difference between left join, right join and inner join?



Why is the basic difference between left join, right join and inner join?..

Answer / Ravi Kant

In SQL (including MySQL), JOIN operations are used to combine rows from two or more tables based on a related column. The main differences between LEFT JOIN, RIGHT JOIN, and INNER JOIN lie in the handling of non-matching values: - An INNER JOIN returns only the matching rows from both tables (no nulls). - A LEFT JOIN includes all the rows from the left table and the matched rows from the right table. If there are no matches, it returns NULL on the right side. - A RIGHT JOIN includes all the rows from the right table and the matched rows from the left table. If there are no matches, it returns NULL on the left side.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is meant by sharding?

1 Answers  


Is mysql free software?

1 Answers  


What is the difference Delete and Drop ?

6 Answers  


How do I update a variable in mysql?

1 Answers  


How would you backup and restore a big MySQL database? What are the advantages of the approach which you have taken over the others?

4 Answers  


What is flush privileges in mysql?

1 Answers  


Why is mysql used?

1 Answers  


How MySQL Optimizes DISTINCT?

1 Answers  


How many rows can mysql hold?

1 Answers  


What is mysql default database?

1 Answers  


What data type is money?

1 Answers  


Is sql and mysql same?

1 Answers  


Categories