How to merge columns into one table?
declare @map_old table(ID int not null) insert into @map_old select 1 insert into @map_old select 2 declare @map_new table(ID int not null) insert into @map_new select 11 insert into @map_new select 22 declare @map(ID int not null, ID2 int not null)
the result in @map should be:
ID ID2 1 11 2 22
Any suggestions? Thx!
you can use identity in the tables like as follows: