Relational Operator - Set-Difference (Except/Minus)

Relational Algebra Between Sql And Query Plan


Set - Difference in Relational Operator

set-difference is a relational operator that takes all Tuples in the relation 1, but not in relation 2

It's also known as:

  • except,
  • or minus

It returns all tuples (row) appearing in the first, but not the second of two union-compatible (ie same column, same type) relations.


<MATH> R_1 - R_2 </MATH>


By default, it will remove all Tuples from the relation 1 even if it contains duplicate.


  • Relation 1
Relation 1
  • Relation 2
Relation 2
  • Except
"Relation 1" EXCEPT "Relation 2"
// empty


Discover More
Data System Architecture
Logical Data Modeling - Duplicate

A duplicate happens when in a set two elements have an equivalence relationship that returns true. In the set {1,1,2,3}, 1 is a duplicate The set {1,2,3} has no duplicate relational operators...
Card Puncher Data Processing
Oracle Database SQL - Minus

in Oracle. Verify that you don't have an ORDER BY clause in one of your query.
Relational Algebra Between Sql And Query Plan
Relational Algebra - Expression and Operators

Relational algebra is based upon the fact that you can pass tabular data through a set of data operators (select, filter, join, sort, union, etc.) in a algebraic structure. It means that: the output...
Sqlite Banner
SQLite - Except (Minus)

in sqlite First table bag Except

Share this page:
Follow us:
Task Runner