Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain the union operator in SQL?

1 Answer

0 votes
by (119k points)

In SQL, the Union operator is used to combining the output from multiple SELECT statements. The result-sets of SELECT statements should be the same number of columns, similar data types of columns, and columns should be in the same order.

Here is the syntax for using the UNION operator in SQL:

SELECT column_list from TableA

UNION

SELECT column_list from TableB;

You can check out his SQL tutorial to learn more about the union operator.

Related questions

0 votes
1 answer
asked May 1, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked May 4, 2020 in SQL by Sudhir_1997 (55.6k points)
+3 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 12, 2019 in SQL by Tech4ever (20.3k points)

Browse Categories

...