Search notes:

Oracle SQL: UNION

union is a set operator.
The following two select statements are equivalent
select * from X UNION
select * from Y;

select distinct *
from (
   select * from X union all
   select * from Y
);

Simple test

Test data:
create table tq84_tab_1 (id integer, txt varchar(10));
create table tq84_tab_2 (id integer, txt varchar(10)); 

begin
   insert into tq84_tab_1 values (4, 'four' );
   insert into tq84_tab_1 values (2, 'two'  );
   insert into tq84_tab_1 values (5, 'five' );
   insert into tq84_tab_1 values (2, 'two'  );
   insert into tq84_tab_1 values (5, 'five' );

   insert into tq84_tab_2 values (5, 'five' );
   insert into tq84_tab_2 values (4, 'four' );
   insert into tq84_tab_2 values (3, 'three');
end;
/
This select statement returns 4 records:
select * from tq84_tab_1 union
select * from tq84_tab_2; 
Cleaning up:
drop table tq84_tab_1;
drop table tq84_tab_2; 

See also

union all
The plan operation UNION ALL.
Set operators
ORA-01789: query block has incorrect number of result columns

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200709, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/select/set-operators/union/index(86): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78