用union
create table table_1
(
id int identity(1,1),
name varchar(80)
)
create table table_2
(
indexs int identity(1,1),
Tname varchar(80)
)
insert into table_1(name) values('li')
insert into table_1(name) values('zhang')
insert into table_1(name) values('wang')
insert into table_1(name) values('zhao')
insert into table_2(Tname) values('yuan')
insert into table_2(Tname) values('fei')
insert into table_2(Tname) values('yun')
select name from table_1
union
select Tname from table_2
结果
name
--------------------------------------------------------------------------------
fei
li
wang
yuan
yun
zhang
zhao