From the course: Oracle Database 19c: Advanced SQL
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
INTERSECT - Oracle Database Tutorial
From the course: Oracle Database 19c: Advanced SQL
INTERSECT
- [Instructor] How does the INTERSECT set operator work in Oracle database select statement. The diagram shows the four set operators you can use an Oracle database. UNION, UNION ALL, INTERSECT and MINUS. In the Venn diagrams, the yellow area is the result of the set operation. The syntax per set operators are straightforward. Multiple select statements joined by any of the set operators. The diagram shows a subset of the select clause. Using a set operator is as simple as joining two subqueries, which is two select statements. The select statement is a simple INTERSECT between two other select statements, two subqueries. But when would you use an INTERSECT in a select statement? The INTERSECT operator does several things. Here are the features and rules. As the name implies, INTERSECT combines two or more sub queries together and finds the intersection between two or more result sets. You can combine several subqueries at once with INTERSECT and other set operators. The INTERSECT…