Using Join
- The join in which all the rows from the right table appear in the output irrespective of the content of the other table is ___________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In a ‘RIGHT JOIN’, the output is produced for every row of the right table, even if it does not exist in the other table. This is the reason why it is called a ‘RIGHT JOIN’. ‘RIGHT JOIN’ and ‘LEFT JOIN’ are a kind of OUTER JOIN.
- In which join all the rows from the left table appear in the output irrespective of the content of the other table?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In a ‘LEFT JOIN’, the output is produced for every row of the left table, even if it does not exist in the right table. This is the reason it is called a ‘LEFT JOIN’. ‘LEFT JOIN’ is a kind of OUTER JOIN.
- What is joining a table to itself called?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Joining a table to itself in a database is called ‘self-join’. When a self-join is being performed, the table is being used multiple times within the query and a table name qualifier is unnecessary.
- The left and right joins are also known as __________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The ‘inner join’ only deals with rows where a match can be found in both tables. The ‘LEFT JOIN’ and ‘RIGHT JOIN’ types are ‘OUTER JOIN’ types which differ from inner joins in this sense.
- The comma operator can also be used to join tables.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The comma (,) operator can be used to join the tables as well. It joins them in the ‘INNER JOIN’ type. It is not desirable to use the comma operator since it has different precedence rules.