635. Union normalized labels — set challenge 2

DBMS Published Updated 0 Views Verified
Write a MySQL-compatible set/anti-set query for the requirement. Remember that UNION removes duplicates while UNION ALL preserves them.
Looking for the latest Sarkari Result 2026 updates? Check the latest government exam results, merit lists and result updates on Sarkari Resultess.
Sarkari Resultess
Questions & Answers

Answer & Explanation

4 Answers
Verified

Option A

Use UPDATE instead of a set operation.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 1
Verified

Option B

Use CROSS JOIN for set difference.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 2
Verified

Option C

Always use UNION ALL even when duplicates must be removed.
Additional Explanation
This option is incorrect for the stated requirement.
Sarkari Resultess
Editorial Answer 3
Verified Correct Answer

Option D

SELECT 'employee' AS type,id,name FROM employees UNION ALL SELECT 'customer',id,name FROM customers;
Additional Explanation
Correct implementation. Prefer parameterized queries in application code, validate affected rows for UPDATE/DELETE, and use transactions for related writes.
Sarkari Resultess
Editorial Answer 4