Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLUNION vs UNION ALLSingle-choice MCQ

Two SELECTs are combined with UNION. The first returns column types (INTEGER, VARCHAR) and the second returns (NUMERIC, VARCHAR). What determines the resulting column types, and is this query valid?

SELECT 1, 'a' UNION SELECT 2.5, 'b';