Tech Junkie Blog - Real World Tutorials, Happy Coding!: SQL: UNION Operator

Monday, February 16, 2015

SQL: UNION Operator

The UNION operator combines two or more SELECT statements into one result set. The SELECT list must be the same in all queries, same columns, expressions, functions, and data types. All UNION queries can be replaced with a join query. The query below combines the Customers select statement with with the Employees statement

SELECT City,Address
FROM Customers
UNION
SELECT City,Address
FROM Employees



Here is the result:






5 comments:


  1. When exploring options for bulk transfer services, many businesses turn to reputable providers to ensure quality and efficiency. One such reliable choice is dtf transfers wholesale, which offers comprehensive solutions tailored to commercial needs. Their commitment to customer satisfaction and competitive pricing make them a popular option in the industry. For those interested in streamlining their transfer processes, considering dtf transfers wholesale could be highly beneficial.

    ReplyDelete

Search This Blog