Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
两个 sql 语句的 UNION 是否有可能产生与分别执行两个语句的输出不同的输出?
是的。绝对地。
union删除重复项。如果您想要相同的结果,请使用union all.
union
union all
另请注意:不能保证之后union的订购。union all如果您希望按特定顺序排列,请使用order by.
order by