Beginning SQL Queries by Clare Churcher

Beginning SQL Queries by Clare Churcher

Author:Clare Churcher
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


As a small aside, many people wonder why this operation is called division, as it doesn’t seem to relate particularly well to something like 4 divided by 2. Division is the inverse (or undoing) of multiplication in normal arithmetic. For set operations, division is like the inverse of the Cartesian product. If you think of taking the Cartesian product of the two tables in the middle and far right of Figure 7-25, you will get a table with the same columns (but not rows) as on the far left of Figure 7-25.

We can answer a number of questions by changing what is on the right-hand side of the division operator. For example, if we wanted to know who had entered all the Open tournaments, we would replace the table in the middle of Figure 7-25 with just the rows for Open tournaments:

SELECT TourID

FROM Tour

WHERE TourType = 'Open';



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.