union 和union all 使用区别
union 和union all 把
查询user表前5条数据

查询user表数据从第7条数据开始,查询两条

通过union来把两个sql中的数据合并到一张表中,只查询出一条数据,会把重复的数据去掉

通过union all查询 出现出了两条数据,不会去重

union 和union all 把
查询user表前5条数据

查询user表数据从第7条数据开始,查询两条

通过union来把两个sql中的数据合并到一张表中,只查询出一条数据,会把重复的数据去掉

通过union all查询 出现出了两条数据,不会去重
