# Set Operations

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: Set Operations
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-clauses/set-operations/index
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-clauses/set-operations/index.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-clauses/set-operations/index.adoc
description: Set operations combine, compare, or contrast result sets from multiple SELECT statements.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-clauses/set-operations.md -->

Set operations combine, compare, or contrast result sets from multiple `SELECT` statements. Redpanda SQL supports the following operations:

-   [Union](union/): Combines two or more sets to create a new set containing all unique elements from the input sets.

-   [Intersect](intersect/): Yields a new set with elements common to all input sets.

-   [Except](except/): Generates a set containing elements from the first set that are not present in the second set.


> 📝 **NOTE**
>
> For all set operations, the data types of corresponding columns in the `SELECT` queries must be compatible. The order of columns is flexible as long as the columns in consecutive places are pairwise compatible. For example, `SELECT col1, col2 FROM table1 UNION SELECT col2, col1 FROM table2`.