From the course: Oracle Database 19c: Advanced SQL

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

MINUS

MINUS - Oracle Database Tutorial

From the course: Oracle Database 19c: Advanced SQL

Start my 1-month free trial

MINUS

- [Speaker] The MINUS set operator works in Oracle Database in a select statement, along with the other set operators to combine multiple results sets into one. This diagram shows the four set operators you can use an Oracle Database: UNION, UNION ALL, INTERSECT and MINUS. The yellow area is the result of the set operation. Let's dig into the MINUS set operator. The syntax for set operators is straightforward. Multiple select statements joined by any of the set operators. The diagram shows a subset of the select clause. The select statement is a simple MINUS set operator between two select statements, two subqueries. MINUS goes way beyond simple subtraction and it does several things. It combines two or more subqueries together and finds the difference between two or more result sets. But just as with the arithmetic MINUS operation, the order is important. You can combine several subqueries at once with MINUS and other set operators. The MINUS set operator, combines two result sets of…

Contents