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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -