DB2 a reference to column is ambigous

25 Views Asked by At

I want to write a select to combine two result sets without using union.

TABLE_A

ID VALID
1 true
2 false

TABLE_B

ID VALID
44 true
55 false

Can I make a select like this without using union

SELECT ID
FROM TABLE_A, TABLE_B

With union...

SELECT ID
FROM TABLE_A
UNION
SELECT ID
FROM TABLE_B
UNION

expected result...

ID VALID
1 true
2 false
44 true
55 false
0

There are 0 best solutions below