A UNION clause combines the results from two or greater SELECT statements into a single result set containing rows from all the queries in the UNION. To write UNION statements you need to create a new Union tab in your Query Builder Workbook. There are a few methods of creating a UNION.

  • You can left-click the menu triangle of the [Union] Deck and choose [Create Union]
  • You can left-click the menu triangle (or right-click) on a worksheet tab at the bottom of the Diagram Pane and choose [New > Union]
  • You can choose [Worksheet > New > Union]

Unions get created in their own tabs in the Diagram Pane and are identified by the Union icon. Unions are constructed by dragging table columns and entities into the decks of the Union tab Diagram Pane, just as you would create the Main Query in the originating worksheet of a Query Builder Workbook.

Once your Union is built, return to the Main Worksheet tab by left-clicking it and you will see that there is a Union listed in the [Union] Deck. Hover over items in the [Union] Deck to view their information.

The [Union] Deck will also display the Union Logic discussed below. If multiple Unions appear in the [Union] Deck you can drag Unions to rearrange their order. 

Union Logic

You can adjust your Union logic by right-clicking it in the [Union] Deck and selecting from the list of options (the list varies depending on database vendor and version):

  • UNION
  • UNION ALL
  • INTERSECT
  • INTERSECT ALL
  • EXCEPT
  • EXCEPT ALL
  • Custom

If you create a Union while within a Union tab, those nested Unions treat your original Union as their Main tab. You will not see them in the [Union] Deck of your original Main Worksheet.



  • No labels