Union Views

A view that contains a UNION or UNION ALL operator in its SELECT statement is known as a union view. Certain restrictions apply to union views:
  • If a CREATE VIEW statement defines a union view, or includes the INTERSECT, MINUS, or EXCEPT set operator, you cannot specify the WITH CHECK OPTION keywords in the CREATE VIEW statement.
  • All restrictions that apply to UNION or UNION ALL set operations in stand-alone SELECT statements also apply to UNION and UNION ALL operations in the SELECT statement of a union view.
  • Similarly, all other restrictions that apply to the INTERSECT, MINUS, or EXCEPT set operators in stand-alone SELECT statements also apply to those set operators in a combined SELECT statement that defines a view.

For a list of these restrictions, see Restrictions on a Combined SELECT. For an example of a CREATE VIEW statement that defines a union view, see Naming View Columns.