ORACLE
ORACLE OPERATORS
UNION
UNION ALL
INTERSECT
MINUS
ORACLE TUTORIAL
Oracle Introduction
What Is Oracle
ORACLE TABLES
Create Tables
Create Table As
Alter Table
Drop Table
Global Temorary Tables
Local Temorary Tables
ORACLE VIEWS
Create View
ORACLE QUERIES
SELECT
INSERT
INSERT ALL
UPDATE
DELETE
TRUNCATE TABLE
ORACLE CLAUSES
DISTINCT
FROM
ORDER BY
GROUP BY
HAVING
ORACLE JOINS
INNER JOIN
OUTER JOIN
EQUI JOIN
SELF JOIN
CROSS JOIN
ANTI JOIN
SEMI JOIN
ORACLE ADVANCE
PROCEDURES
FUNCTION
CURSOR
TRIGGER

MINUS



Oracle - Minus


In Oracle, MINUS operator is used to return all rows in the first SELECT statement that are not returned by the second SELECT statement.

Each SELECT statement has a dataset and the MINUS operator returns all documents from the first dataset and then removes all documents from the second dataset.


Syntax :

SELECT expression1, expression2, ... expression_n  
FROM table1  
WHERE conditions  
MINUS  
SELECT expression1, expression2, ... expression_n  
FROM table2  
WHERE conditions;  

Parameters :

  • expression1, expression2, ... expression_n: It specifies the columns that you want to retrieve.

  • table1, table2: it specifies the tables that you want to retrieve records from.

  • conditions: it specifies the conditions that must be fulfilled for the records to be selected.


    Note: The expressions must be same in number for both the SELECT statement and have similar datatype.


    Oracle MINUS Example :


    This example will return one field with the same datatype from two tables "suppliers" and "order_details".

    SELECT supplier_id  
    FROM suppliers  
    MINUS  
    SELECT supplier_id  
    FROM order_details;  
    

    Output :

    SUPPLIER_ID
    20
    21
    22
    25
    28
    30
    31
    50


    What Is Oracle

    What Is Oracle

    posted on 2019-11-29 01:11:21 - ORACLE Tutorials


    TRIGGER

    ORACLE - Trigger

    posted on 2019-11-28 22:14:22 - ORACLE Tutorials


    CURSOR

    ORACLE - Cursor

    posted on 2019-11-28 22:13:54 - ORACLE Tutorials


    MySQL TRIGGERS

    MySQL - Triggers

    posted on 2019-11-29 21:44:07 - mysql Tutorials


    Grant_ Revoke Privilege

    MySQL - Grant_ Revoke Privilege

    posted on 2019-11-26 23:15:04 - mysql Tutorials


    MySQL Vs SQL

    MySQL Vs SQL

    posted on 2019-11-25 05:02:26 - mysql Tutorials