UNION

UNION is a select statement
Used to combine records from two queries while excluding any duplicates.
When you compare 2 tables both tables must have the same number of fields, but the fields do not have to have the same data type.


(Query > SQL Specific > Union)


The only way to work with a union query is in the SQL view


SELECT       LastName 
             Firstname
FROM TableName1
UNION
SELECT LastName
             Firstname
FROM TableName2

SELECT       * 
FROM CUSTOMERS
UNION
SELECT *
FROM CUSTOMERS


UNION ALL

Used to combine records from two queries while including any duplicates





© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext