> ## 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_ExteriorRing

Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon.

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

## Signatures

```sql theme={"system"}
ST_ExteriorRing(geom: Geometry)
```

## Parameters

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

## Return type

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

## Example

```sql theme={"system"}
SELECT ST_ExteriorRing(ST_GeomFromText('POLYGON((0 0 1, 1 1 1, 1 2 1, 1 1 1, 0 0 1))'))
```

```
LINESTRING (0 0, 1 1, 1 2, 1 1, 0 0)
```
