What are the different types of joins in sql?

Answer Posted / nashiinformaticssolutions

• Inner Join: Returns matching rows from both tables.
• Left Join (Left Outer Join): Returns all rows from the left table and matching rows from the right table.
• Right Join (Right Outer Join): Returns all rows from the right table and matching rows from the left table.
• Full Join (Full Outer Join): Returns all rows when there’s a match in one of the tables.
• Cross Join: Returns the Cartesian product of both tables.
• Self Join: A table joins itself.
Example Query:
SELECT e1.name, e2.name AS manager_name
FROM employees e1
JOIN employees e2 ON e1.manager_id = e2.id;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a sql profiler?

770


how to dump a table to a file with 'mysqldump'? : Sql dba

739


What is pl sql collection?

694


How is pl sql different from sql?

726


Is join and inner join the same?

724






What are the differences between implicit and explicit cursors?

706


How do I clear the screen in sql plus?

755


What is a database trigger?

791


What is before and after trigger?

691


what are properties of a transaction? : Sql dba

760


Does normalization improve performance?

763


What mean sql?

738


Explain what is a subquery ?

852


Can variables be used in sql statements?

747


What is tuple in sql?

732