Union and Union all are used to combine the result from two tables. It means when you want data from 2 different tables or 2 different queries and wants to combine the result you can use Union and Union All.
In SQL the Union and Union all operators are used to combine the results set into a single result set. But both operators have some key differences.
First Create table and insert some data for query execution.
All about Union and Union All
In SQL the Union and Union all operators are used to combine the results set into a single result set. But both operators have some key differences.
First Create table and insert some data for query execution.
Code:
create table A(id int,name varchar(20)); create table B(id int,name...