DEV Community

Charlie Barajas
Charlie Barajas

Posted on

UNION in SQL Postgre

When using UNION, I came to Udacity's course on Intro to SQL to learn what it takes to be a data anaylst.

When appending data using UNION, UNION ALL against two instances and selected columns will bring columns from differing tables. The requests from two SELECT statements are brought together.
UNION is great when dealing with multiple tables and you don't want to use five subquery SELECT statement. Here's an example;

SELECT *
FROM accounts

UNION ALL

SELECT *
FROM accounts

Top comments (0)