What are the different types of joins in sql?
Answers were Sorted based on User's Feedback
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 |
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 |
• 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 |
Is sql developer case sensitive?
What is sql deadlock?
what is query cache in mysql? : Sql dba
What is trigger in pl sql?
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
i have some prob lem to tell me about my self in interview first round ...
What is equi join in sql?
what is clause? : Sql dba
Any attempt to navigate programmatically to disabled form in a call_form stack is allowed?
What is sql data?
What is informix sql?