Multiple choice technology databases

What is the result of the following SQL: Select 1 from dual UNION Select 'A' from dual;

  1. Error

  2. 1 & A are retreived

  3. 1 is retreived

  4. A is retreived

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

UNION in Oracle requires compatible data types across the combined result sets. The first SELECT returns numeric (1), the second returns character ('A'). Oracle cannot implicitly convert these to a common type for UNION, causing a type mismatch error. UNION ALL would also fail with the same error.