bing
Flat 10% & upto 50% off + 10% Cashback + Free additional Courses. Hurry up
×
UPTO
50%
OFF!
Intellipaat
Intellipaat

Union in SQL

Union in SQL is used to combine the two or more results. The each SELECT statement must have same no. of columns, same datatypes and in the same order.

Watch this Union Command in SQL Tutorial video

Syntax:

SELECT column_name FROM table1

UNION

SELECT column_name FROM table2;

Union All in SQL

The SQL Union displays unique values by default. To get the duplicate values we use UNION ALL.

SELECT column_name FROM table1 
UNION ALL 
SELECT column_name FROM table2;

Example:

SELECT City FROM Student_details 
UNION 
SELECT City FROM College;
Previous Next

Download Interview Questions asked by top MNCs in 2019?

"0 Responses on Union in SQL - Union All in SQL"

    100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.
    top

    Sales Offer

    Sign Up or Login to view the Free Union in SQL - Union All in SQL.