Union

This lesson demonstrates how to combine results from several queries.

We'll cover the following

Union

The UNION clause allows us to combine the results from several queries together. The clause doesn’t join the table but merely clubs the two results together.

Syntax

<Query1>

UNION

<Query2>

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy and paste the command ./DataJek/Lessons/27lesson.sh and wait for the MySQL prompt to start-up.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.