Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

MariaDB UNION ALL Operator

MariaDB UNION ALL Operator is same as UNION operator but it doesn't remove the duplicate records. It returns all rows from the query and it does not remove duplicate rows between the various SELECT statements.

Syntax:

Note: In MariaDB UNION ALL operator, each SELECT statement must have the same number of fields in the result sets with similar data types.


Return Single Field using UNION ALL Operator

Output:

MariaDB Union all operator 1

You can see that it does not remove duplicate records.


UNION ALL Operator with ORDER BY Clause

Use UNION ALL operator with ORDER BY clause to retrieve multiple columns from both table.

Output:

MariaDB Union all operator 2





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA