May 2020
Beginner
564 pages
14h 9m
English
To run queries that intersect in Oracle, PostgreSQL, and SQL Server, you can use the INTERSECT operator. The following screenshot shows you the output resulting from INTERSECT:

The previous query from MySQL would be rewritten like this for the other RDMS:
USE lahmansbaseballdbSELECT playeridFROM batting INTERSECT SELECT playeridFROM appearancesORDER BY playerid;
The previous query will return rows where the two tables have overlap.
Read now
Unlock full access