About
Relational Operator - Set-Difference (Except/Minus) in sqlite
Articles Related
Example
- First table bag
CREATE TABLE bag1 (ELEMENT char);
insert into bag1 (element) values (1);
insert into bag1 (element) values (1);
insert into bag1 (element) values (2);
select * from bag1;
1
1
2
CREATE TABLE bag2 (ELEMENT char);
insert into bag2 (element) values (1);
insert into bag2 (element) values (2);
select * from bag2;
1
2
- Except
select element from bag1
EXCEPT
select element from bag2;
// empty