Skip to content
Advertisement

Union ALL with different number of columns

I have an Employee table with these columns :

  • EmployeeId
  • Fullname
  • Phone
  • Department
  • Team
  • Function
  • Manager

and EmployeeHistory containing the history with different columns, but there are some in common :

  • EmployeeId
  • Fullname
  • Email
  • Geolocation
  • Department
  • Team
  • Function
  • Manager

How can I union them?

Advertisement

Answer

Replace uncommon columns by dummy values.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement