-- baza danych definiowana w skrypcie
-- OPERACJE MNOGOSCIOWE
-- semantyka operacji UNION, MINUS i INTERSECT

create table A (
  a1 integer
);

create table B (
  b1 integer
);

insert into A values (1);
insert into A values (1);
insert into A values (2);
insert into A values (3);
insert into A values (3);
insert into A values (5);

insert into B values (1);
insert into B values (1);
insert into B values (1);
insert into B values (2);
insert into B values (2);
insert into B values (3);
insert into B values (4);

select * from A union 		select * from B;
select * from A minus 		select * from B;
select * from A intersect	select * from B;

select * from A union all	select * from B;
select * from A minus all	select * from B;
select * from A intersect all	select * from B;
