From the course: Oracle Database 19c: Advanced SQL

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

UNION ALL

UNION ALL - Oracle Database Tutorial

From the course: Oracle Database 19c: Advanced SQL

Start my 1-month free trial

UNION ALL

- [Instructor] The union all set operator works in Oracle database in a select statement. Let me show you how it compares to the other set operators. As an overview, the diagram shows the four set operators you can use in Oracle database. Union, union all, intersect and minus. In the Venn diagrams, the yellow area is the result of the set operation. I'll focus on the union all set operator. The syntax for set operators is straightforward. Multiple select statements joined by any of the set operators. The diagram shows a subset of the select clause. Using a set operator is as simple as joining two sub queries, which is two select statements. The example select statement is a simple union all between two other select statements, two sub queries. Wow, I have to think it through every time, do I use a union all, or do I have to use a union? The union all operator does one thing. Here are its features and the rules. As the name implies, union all combines two or more sub queries together…

Contents