أسعار العملات

دولار / شيكل 3.29
دينار / شيكل 4.64
جنيه مصري / شيكل 0.21
ريال سعودي / شيكل 0.88
يورو / شيكل 3.92
حالة الطقس

القدس / فلسطين

الجمعة 20.24 C

which join is to be used between two tables a and b when the resultant table needs rows from a and b that matches the condition and rows from a that does not match the condition?

question

question

طباعة تكبير الخط تصغير الخط

This section focuses on the "Joins" in the SQL. These Multiple Choice Questions (mcq) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1.  How many join types in join condition:

A. 2
B. 3
C. 4
D. 5

Ans : D

Explanation: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN.

2. Which are the join types in join condition:

A. Cross join
B. Natural join
C. Join with USING clause
D. All of the mentioned

Ans : D

Explanation: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN are the types of joins.

3. Which join refers to join records from the write table that have no matching key in the left table are include in the result set:

A. Left outer join
B. Right outer join
C. Full outer join
D. None of the above

Ans : B

Explanation: Right outer join refers to join records from the write table that have no matching key in the left table are include in the result set.

4. Relation R1 has 10 tuples and 5 attributes. Relation R2 has 0 tuples and 7 attributes. When a CROSS JOIN is achieved between R1 and R2, how many tuples would the resultant set have?

A. 28
B. 10
C. 0
D. 35

Ans : C

Explanation: When a CROSS JOIN is achieved between R1 and R2, 0 tuples the resultant set will have.

5. Which join is to be used between two tables A and B when the resultant table needs rows from A and B that matches the condition and rows from A that does not match the condition?

A. Outer Join
B. Cross Join
C. Inner Join
D. None of the above

Ans : A

Explanation: Outer Join is to be used between two tables A and B when the resultant table needs rows from A and B that matches the condition and rows from A that does not match the condition.

 

 

6. Which of the following conditions has to be satisfied for INNER JOIN to work?

A. Columns used for joining must have same name
B. Columns used for joining can have same or different name
C. Columns used for joining must have different names
D. Columns used for joining must have different names

 

Ans : B

Explanation: Columns used for joining can have same or different name is the following conditions has to be satisfied for INNER JOIN to work

7. Which join is equivalent to Cartesian Product?

A. INNER JOIN
B. OUTER JOIN
C. CROSS JOIN
D. NATURAL JOIN

Ans : C

Explanation: CROSS JOIN is equivalent to Cartesian Product.

8. Which of the following statements are False?

A. RIGHT OUTER JOIN is equivalent to LEFT OUTER JOIN if order of tables are reversed
B. FULL OUTER JOIN is same as CROSS JOIN
C. SELF JOIN is a special type of OUTER JOIN
D. Both B and C

Ans : D

Explanation: Both B and C option are False statements.

9. To specify a normal join, using the keyword inner is?

A. Mandatory
B. Optional
C. Independent
D. Free

Ans : B

Explanation: To specify a normal join, using the keyword inner is Optional.

10. Left outer join preserves tuples only in the relation named before

A. Right outer join operation
B. Right inner join operation
C. Left inner join operation
D. Left outer join operation

Ans : D

Explanation: Left outer join preserves tuples only in the relation named before Left outer join operation.

 

 

 

 

 

 

 

 

 

اقرأ أيضا