oracle - SQL select from several tables and output to several tables -


i have several tables of contain distinct id columns , have additional column containing dates. need retrieve ids corresponding dates tables. there way output ids , dates tables @ once , without creating duplicates ?

you can use union all combine multiple queries:

select 'table_a' source, table_a_id id, creation_date table_a union select 'table_b' source, table_b_id id, creation_date table_b union select 'table_c' source, table_c_id id, creation_date table_c; 

if need remove duplicate rows, can use union instead of union all, @ cost of performance.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -