Top "Union" questions

Use this tag only for questions about UNION, a keyword of the SQL language for combining the results of multiple SQL queries.

UNION syntax in Cakephp

Anyone knows a good way to make UNION query in CakePHP? I would like to avoid using $this->query();. …

php sql mysql cakephp union
How can I order entries in a UNION without ORDER BY?

How can I be sure that my result set will have a first and b second? It would help me …

sql sql-order-by union
Which is faster: Union or Concat?

Which is faster: Union or Concat? I don't care about the order of the elements. Enumerable.Union Method Enumerable.Concat …

c# .net linq union concat
SQL syntax error at or near 'union'

I have a small query, and a union to put another small query next to it. However, the union has …

sql postgresql sql-order-by union
Shallow copy of a hashset

Whats the best way of doing it? var set2 = new HashSet<reference_type>(); Traverse the set with a …

c# collections union traversal shallow-copy
How to union two data tables and order the result

Q: If I have two DataTables like this : Dt1(emp_num,emp_name,type) Dt2(emp_num,emp_name,type) …

c# asp.net linq datatable union
SQL UNION ALL to eliminate duplicates

I found this sample interview question and answer posted on toptal reproduced here. But I don't really understand the code. …

mysql sql sql-server union union-all
Convert List<List<T>> into List<T> in C#

I have a List<List<int>>. I would like to convert it into a List<…

c# linq generics list union
Combining NSArrays Through Intersection and Union

I have two NSArrays A and B that share some common elements, e.g. A: 1,2,3,4,5 B: 4,5,6,7 I would like to …

objective-c nsarray union set-theory
MySQL DELETE FROM with UNION subquery by IN condition

I have tripped up on a curious SQL error. The last query doesn't work. Of course I can just split …

mysql subquery union sql-delete in-subquery