Which SQL set operator combines the output of two queries but preserves all duplicate rows without filtering them? MCQ with Answer and Explanation

Which SQL set operator combines the output of two queries but preserves all duplicate rows without filtering them?
A. UNION
B. UNION ALL
C. MINUS
D. INTERSECT
Answer: Option B
Solution (By JKSSB Mock Tests)
UNION ALL appends the results of multiple SELECT queries together without performing any deduplication, making it faster than UNION.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which clause is used in SQL to sort the final query result set in ascending or descending order?
A. ORDER BY
B. ARRANGE BY
C. SORT BY
D. GROUP BY

Correct Answer: Option A


Explanation:
The ORDER BY clause is used to sort the result set of a query in either ascending (default) or descending (using DESC) order.

This question belongs to: Computer Database Management System (DBMS)
Question #2
In SQL, which operator is used to combine two conditions and returns true if both are true?
A. NOT
B. XOR
C. AND
D. OR

Correct Answer: Option C


Explanation:
The AND operator returns true only if both conditions are true.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is the purpose of a Foreign Key?
A. To create indexes
B. To sort data
C. To link two tables and enforce referential integrity
D. To uniquely identify records

Correct Answer: Option C


Explanation:
A foreign key establishes a relationship between tables and maintains referential integrity.

This question belongs to: Computer Database Management System (DBMS)