I'm going to go on a hunch. I think it is because of different data types being chosen when you give it just NULL. Beats me why it would be different for UNION
vs UNION ALL
.
Try this:
Select
cast (NULL as int) as insId,
cast (NULL as int) as carId,
cast (NULL as Date) as insFromDate
from carInsurance
UNION
Select insId, carId, insFromDate from carInsurance
Extending the same line of thought, I would suggest is reversing the order of your SELECTs:
Select insId, carId, insFromDate from carInsurance
UNION
Select NULL as insId, NULL as carId, NULL as insFromDate from carInsurance