# E071-01: UNION DISTINCT table operator

statement ok
CREATE TABLE TABLE_E071_01_01_011 ( ID INT PRIMARY KEY, A INT );

statement ok
CREATE TABLE TABLE_E071_01_01_012 ( ID INT PRIMARY KEY, B INT );

statement ok
INSERT INTO TABLE_E071_01_01_011(ID,A) VALUES (0,1),(1,2),(2,1)

statement ok
INSERT INTO TABLE_E071_01_01_012(ID,B) VALUES (1,2)

query I rowsort
SELECT A FROM TABLE_E071_01_01_011 UNION DISTINCT SELECT B FROM TABLE_E071_01_01_012
----
1
2

query I rowsort
SELECT A FROM TABLE_E071_01_01_011 UNION ALL SELECT B FROM TABLE_E071_01_01_012
----
1
1
2
2
