Relational Operator - Set-Difference (Except/Minus)

1 - About

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.

3 - Syntax

<MATH> R_1 - R_2 </MATH>

4 - Duplicate

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

5 - Example

  • Relation 1
Relation 1
1
1
2
  • Relation 2
Relation 2
1
2
  • Except

"Relation 1" EXCEPT "Relation 2"


// empty

6 - Database


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap