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

# ST_Contains

> Tests whether a polygon strictly contains a point.

Tests whether one spatial value contains another. For the native overloads, a point on the exterior boundary or on a hole boundary is outside the polygon interior.

## Syntax

### Native overloads

```sql theme={null}
BOOLEAN ST_Contains(GEOGRAPHY polygon, GEOGRAPHY point)
BOOLEAN ST_Contains(GEOMETRY polygon, GEOMETRY point)
```

The native overloads accept an XY `POINT` as the second argument and an XY `POLYGON` or `MULTIPOLYGON` as the first. Both `GEOMETRY` arguments must have matching descriptors. Mixed native `GEOGRAPHY`/`GEOMETRY` calls are rejected. `NULL` propagates, and an `EMPTY` input returns `false`.

### Legacy overloads

```sql theme={null}
BOOLEAN ST_Contains(VARCHAR shape1, VARCHAR shape2)
```

Both arguments use the legacy `VARCHAR` shape encoding.

## Examples

```SQL theme={null}
SELECT ST_Contains(
    ST_GeomFromText('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))', 'EPSG:3857'),
    ST_GeomFromText('POINT (5 5)', 'EPSG:3857'));
-- true

SELECT ST_Contains(
    ST_GeogFromText('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))'),
    ST_GeogFromText('POINT (0 5)'));
-- false: the point is on the boundary
```

## Keywords

ST\_CONTAINS,ST,CONTAINS

## Related data types

[GEOGRAPHY](/documents/4.2/sql-reference/data-types/spatial-types/GEOGRAPHY.md), [GEOMETRY](/documents/4.2/sql-reference/data-types/spatial-types/GEOMETRY.md), [VARCHAR](/documents/4.2/sql-reference/data-types/string-type/VARCHAR.md), [BOOLEAN](/documents/4.2/sql-reference/data-types/numeric/BOOLEAN.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.