I am new to sql and struggling to solve this very simple task.
Considering,
with table1 as (select '1' col1 from dual union
select '2' col1 from dual union
select 'NO_PATTERN' col1 from dual union
select 'RANDOM_STUFF' col1 from dual)
select * from table1;
and,
with table2 as (select 'aaa' col2 from dual union
select '4' col2 from dual union
select 'qwewqeq' col2 from dual
union select 'UUUUUU' col2 from dual)
select * from table2;
I want to perform a cbind()
between the two columns into a new table which is the "vertical union" of table1.[col1] and table2[col2].
The EXPECTED solution is:
with solution as (select '1' col1, 'aaa' col2 from dual union
select '2' col1, '4' col2 from dual union
select 'NO_PATTERN' col1, 'qwewqeq' col2 from dual union
select 'RANDOM_STUFF' col1, 'UUUUUU' col2 from dual)
select * from solution;
Any idea?