Hi ,
I have solved that issue myself by using the table variables in the sql server.
The following code will give the same result what I expected.
DECLARE @table1 TABLE (id int, name varchar(10))
INSERT INTO @table1 VALUES (1, 'issue1')
INSERT INTO @table1 VALUES (2,'issue2')
DECLARE @table2 TABLE (id int, name varchar(10), name2 varchar(10))
INSERT INTO @table2 VALUES (1, 'issue3','OneT')
INSERT INTO @table2 VALUES (2,'issue4','TwoT')
DECLARE @table3 TABLE (result nvarchar(max))
INSERT INTO @table3
SELECT name from @table1
UNION SELECT name from @table2
SELECT * FROM @table3