The MINUS command combines results with the
MINUS operator, which returns only
unique rows returned by the first query but not by the second.
Syntax:
Select column1, column2, .... column_n From Table1
MINUS
Select column1, column2, .... column_n From Table2;
Table1
SQL> select * from emp;
ID NAME
---------- --------------------
1 sap
2 pamilla
3 chhavi
4 vishu
Table2
SQL> select * from costumer;
ID NAME
---------- --------------------
1 sim
2 vishu
3 pra
2 vishu
Example of INTERSECT command
SQL> select name from emp
2 MINUS
3 select name from costumer
4 /
NAME
--------------------
chhavi
pamilla
sap