slect * into newtable from (select f1,f2 from tb union all select f3,f4 from tb) t
select f1,f2 from tb union all select f3,f4 from tb
select f1 , f2 from tb union all select f3 , f4 from tb
--1,不用建表 select * into newtable from (select f1,f2 from tb union all select f3,f4 from tb) t --2,要建表 insert newtable(test1,test2) select f1,f2 from tb union all select f3,f4 from tb
insert into table(test1,test2) select F1,F2 from table union all select F3,F4 from table
from
(select f1,f2 from tb union all
select f3,f4 from tb) t
union all
select f3,f4 from tb
select f1 , f2 from tb
union all
select f3 , f4 from tb
select * into newtable
from
(select f1,f2 from tb union all
select f3,f4 from tb) t
--2,要建表
insert newtable(test1,test2)
select f1,f2 from tb
union all
select f3,f4 from tb
insert into table(test1,test2)
select F1,F2
from table
union all
select F3,F4
from table