> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_SymDifference

Return the symmetrical difference between geometry A and B (return parts of geometries which are in either of the sets, but not in their intersection)

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_SymDifference/ST_SymDifference.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=52c08a46f8d5ccd550d6baeee22783ce" alt="ST_SymDifference" width="500" height="300" data-path="images/sql-functions/ST_SymDifference/ST_SymDifference.svg" />

## Signatures

```sql theme={"system"}
ST_SymDifference (A: Geometry, B: Geometry)
```

## Parameters

<ParamField body="A" type="Geometry" required>
  The input geometry.
</ParamField>

<ParamField body="B" type="Geometry" required>
  The second geometry.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_SymDifference(ST_GeomFromWKT('POLYGON ((-3 -3, 3 -3, 3 3, -3 3, -3 -3))'), ST_GeomFromWKT('POLYGON ((-2 -3, 4 -3, 4 3, -2 3, -2 -3))'))
```

```
MULTIPOLYGON (((-2 -3, -3 -3, -3 3, -2 3, -2 -3)), ((3 -3, 3 3, 4 3, 4 -3, 3 -3)))
```
