# Set Operations

- [Precedence Control in Table Operations](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/set-operations/precedence-control-in-table-operations.md): Control the execution order of UNION, EXCEPT, and INTERSECT operations. Learn how to use parentheses to define explicit operation priority.
- [EXCEPT](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/set-operations/except.md): Return rows from the first result set that do not appear in the second. This set operator performs a subtraction of two datasets.
- [INTERSECT](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/set-operations/intersect.md)
- [MINUS](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/set-operations/minus.md): Oracle-compatible synonym for the EXCEPT operator. It returns rows from the first query that are not present in the second query.
- [UNION](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/set-operations/union.md): Combine results from multiple SELECT statements into a single result set. This operator can optionally remove duplicates or include all rows.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/set-operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
