May 2020
Beginner
564 pages
14h 9m
English
MINUS and EXCEPT (depending on the RDMS, as outlined here) are the equivalent of right and left excluding joins. The following screenshot shows you the output resulting from a MINUS or EXCEPT join:

The following is a code example of a right excluding join in MySQL:
SELECT p.playeridFROM lahmansbaseballdb.allstarfull asfRIGHT OUTER JOIN lahmansbaseballdb.people p ON p.playerid = asf.playeridWHERE asf.playerid IS NULL;
In the previous query, you are only getting rows from the right table (people) where playerid in the left table (allstarfull) is NULL.
Read now
Unlock full access