- 아래 두 쿼리를 결합하고 싶어요.

    : 문제는 두 쿼리의 컬럼 개수는 같으나 데이터 타입이 다릅니다.


SELECT department_id, hire_date

FROM   employees;


SELECT department_id, location_id

FROM   departments;



↓ ↓ ↓


SELECT department_id, hire_date, to_number(null) as location

FROM   employees

UNION

SELECT department_id, to_date(null), location_id

FROM   departments;



+ Recent posts