SQL UNION result not the same as the result of individual statements? -
is possible union of 2 sql statements produce output different output of executing each of 2 statements separately?
yes. absolutely.
the union removes duplicates. if want same results, use union all.
also note: ordering after union , union all not guaranteed. if want things in particular order, use order by.
Comments
Post a Comment