What are the different types of joins in sql?

Answers were Sorted based on User's Feedback



What are the different types of joins in sql?..

Answer / 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

What are the different types of joins in sql?..

Answer / 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

What are the different types of joins in sql?..

Answer / hr@tgksolutions.com

• 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

More SQL PLSQL Interview Questions

Is sql developer case sensitive?

0 Answers  


What is sql deadlock?

0 Answers  


what is query cache in mysql? : Sql dba

0 Answers  


What is trigger in pl sql?

0 Answers  


i want insert 10 records from table a to table b. if i m using statement level trigger how many record insert ?in row level trigger how many record inserted???

3 Answers   Scope International,






how mysql optimizes distinct? : Sql dba

0 Answers  


i have some prob lem to tell me about my self in interview first round ...

0 Answers  


What is equi join in sql?

0 Answers  


what is clause? : Sql dba

0 Answers  


Any attempt to navigate programmatically to disabled form in a call_form stack is allowed?

0 Answers  


What is sql data?

0 Answers  


What is informix sql?

0 Answers  


Categories