27,580
社区成员
发帖
与我相关
我的任务
分享
insert into 新表
select * from
(
select a.id,a.name from a
union all
select b.id,'' from b
)t
--1.类型不同的时候要转换
--2.列数不同的时候用默认值代替
--例如
表a:id int,name char
b表:id int
select a.id,a.name from a
union all
select b.id,'' from b