TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Oracle Minus

Oracle minus query for beginners and professionals with examples on insert, select, update, delete, table, view, join, key, functions, procedures, indexes, cursor etc.

<< Back to ORACLE

Oracle MINUS operator

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.

For example

Oracle Minus Operator

Syntax

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

Parameters

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

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

3) 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

Oracle Minus Operator 2
Next TopicOracle Joins




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf