34,590
社区成员
发帖
与我相关
我的任务
分享
select 姓名,年龄,'' as 性别 from ta where 姓名 = 'a'
union all
select 姓名,年龄,性别 from tb where 姓名 = 'a'
select * from
(
select *,' ' 性别 from ta
union all
select * from tb
) t
where 姓名 = 'a'
错误提示的已经够明显了。必须包含同样数目
select 姓名,年龄 from ta where 姓名 = 'a'
union all
select 姓名,年龄 from tb where 姓名 = 'a'