select * from a union select * from b 能详细说下么

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/21 23:08:10
select*fromaunionselect*fromb能详细说下么select*fromaunionselect*fromb能详细说下么select*fromaunionselect*fromb能

select * from a union select * from b 能详细说下么
select * from a union select * from b 能详细说下么

select * from a union select * from b 能详细说下么
恩,UNION 跟 UNION ALL 是交集跟并集的写法
select * from a union select * from b --这种是A表与B表结果的交集写法,合并表,没有重复行;
select * from a union all select * from b --这种是A表与B表结果的并集写法 有重复行;