Database Reference
In-Depth Information
Figure 13.1
Duplicating Rows
with UNION
ALL.
The INTERSECT operator returns an intersection or natural join type
result between two queries. In the following example, all nonstyle entries
are returned from the GENRE table. The result is shown in Figure 13.3.
SELECT GENRE_ID, GENRE FROM GENRE
INTERSECT
SELECT * FROM GENRES;
In the next example, the MINUS operator is used to remove all genres
from the GENRE table using the GENRES view, returning only GENRE
style rows 1, 2, and 3. The result is shown in Figure 13.4.
SELECT GENRE_ID, GENRE FROM GENRE
MINUS
SELECT * FROM GENRES;
 
Search WWH ::




Custom Search