Difference between revisions of "UNION"

From SQLZOO
Jump to navigation Jump to search
(Blanked the page)
Line 1: Line 1:
Make union between different tables to build one single view or results?
<div class='ht'>
<div class=params>schema:gisq</div>
<div>
List a number of SELECT statements separated by the UNION key word. Be sure that you have the same number of columns in each of the SELECT statements.
</div>
<source lang=sql class='tidy'></source>
<source lang=sql class='setup'></source>


SELECT name FROM bbc WHERE name LIKE 'Z%'
UNION
SELECT name FROM actor WHERE name LIKE 'Z%'
</div>

Revision as of 11:48, 10 September 2012