其他sql格式也在更新中,可直接查看这个系列,要是没有你需要的格式,可在评论或私信我
sql案例场景
select id as id from a where id=1
union 的案例
- 对两个结果集进行并集操作,不包括重复行,去重
- 会对获取的结果进行排序操作
select id as id from a where id=1
union
select id as id from a where id=1
union all 的案例
- 对两个结果集进行并集操作,包括重复行,不去重
- 不会对获取的结果进行排序操作
select id as id from a where id=1
union all
select id as id from a where id=1