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

Return true if A is fully contained by B

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_Within/ST_Within_true.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=5fcc3d07a33b5d21ca194f285ed4536f" alt="ST_Within returning true" width="400" height="300" data-path="images/sql-functions/ST_Within/ST_Within_true.svg" />

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_Within/ST_Within_false.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=912259d05f61f1fcc4613eb3dcb230e8" alt="ST_Within returning false" width="400" height="300" data-path="images/sql-functions/ST_Within/ST_Within_false.svg" />

## Signatures

```sql theme={"system"}
ST_Within (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="Boolean">
  Returns `true` or `false`.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_Within(ST_GeomFromWKT('POLYGON((0 0,3 0,3 3,0 3,0 0))'), ST_GeomFromWKT('POLYGON((1 1,2 1,2 2,1 2,1 1))'))
```

```
false
```
