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. MINUS
B. UNION ALL
C. INTERSECT
D. UNION
Answer: Option B
Solution (By JKExamLibrary)
UNION ALL appends the results of multiple SELECT queries together without performing any deduplication, making it faster than UNION.

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

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
What is the difference between a clustered index and a non-clustered index?
A. Clustered index is faster for inserts
B. Non-clustered index determines physical order; clustered does not
C. Clustered index determines the physical order of data; non-clustered does not
D. They are the same

Correct Answer: Option C


Explanation:
A clustered index sorts and stores the data rows in the table based on key values, while a non-clustered index is a separate structure that points to the data rows.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Which clause is used to assign a temporary alias name to a column or table in an SQL statement for better readability?
A. AS
B. WITH
C. USING
D. LIKE

Correct Answer: Option A


Explanation:
The AS keyword is used to assign a temporary alias name to an expression, column, or table within an SQL statement query execution context.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
The total number of tuples (rows) contained within a relational database table is called its what?
A. Cardinality
B. Degree
C. Density
D. Dimension

Correct Answer: Option A


Explanation:
The number of tuples or rows in a relation is defined as the cardinality of that relation.

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