What are the different types of joins in sql?

Answer Posted / glibwaresoftsolutions

• 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

Can we use threading in pl/sql?

712


What is bulk collect in pl sql?

727


Can we use joins in subquery?

796


How to add a column ‘salary’ to a table employee_details?

770


Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?

3309






Is sql better than excel?

700


What are some emotional triggers?

749


What are the types of optimization?

688


What version is sql?

729


What are sql procedures?

759


How do I run a pl sql procedure in sql developer?

691


Explain character-manipulation functions?

836


What is mutating error?

697


How can check sql version from command line?

721


What is an implicit commit?

762