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.

What is the difference between UNION and UNION ALL?

What is the difference between UNION and UNION ALL?

sql union union-all
What is the difference between JOIN and UNION?

What is the difference between JOIN and UNION? Can I have an example?

sql database join union
How to order by with union in SQL?

Is it possible to order when the data is come from many select and union it together? Such as Select …

sql sql-order-by union
Combine two tables for one output

Say I have two tables: KnownHours: ChargeNum CategoryID Month Hours 111111 1 2/1/09 10 111111 1 3/1/09 30 111111 1 4/1/09 50 222222 1 3/1/09 40 111111 2 4/1/09 50 UnknownHours: ChargeNum Month Hours 111111 2/1/09 70 111111 3/1/09 40.5 222222 7/1/09 25.5 I need to group these hours, …

sql union
Intersection and union of ArrayLists in Java

Are there any methods to do so? I was looking but couldn't find any. Another question: I need these methods …

java list union intersection
Combine two tables that have no common fields

I want to learn how to combine two db tables which have no fields in common. I've checked UNION but …

sql-server union
SQL Query - Using Order By in UNION

How can one programmatically sort a union query when pulling data from two tables? For example, SELECT table1.field1 FROM …

sql ms-access sorting sql-order-by union
Using union and order by clause in mysql

I want to use order by with union in mysql query. I am fetching different types of record based on …

mysql sql sql-order-by union
UNION with WHERE clause

I'm doing a UNION of two queries on an Oracle database. Both of them have a WHERE clause. Is there …

sql oracle union
How to use group by with union in t-sql

How can I using group by with union in t-sql? I want to group by the first column of a …

sql sql-server tsql group-by union