SQL Flow Field Guide

geography.STOverlaps

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

spatial predicate STOverlaps

What changes

Input
one or two spatial instances
Output or change
bit
Return type
SQL Server return type: bit CLR return type: SqlBoolean

Syntax at a glance

.STOverlaps ( other_geography )

Work example

Use geography.STOverlaps to test the specific topological overlap relationship.

Check matching SRIDs and compare partial overlap with containment. Confirm both values use the same SRID before comparing or combining them.

Check your work The polygons share interior area, and neither contains the other, so they overlap.

Practice SQL

Open in SQL Flow

Open the SQL for a walkthrough. Run the example in SQL Server to check its result.

SELECT a.shape.STOverlaps(b.shape) AS polygons_overlap FROM (VALUES (geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326))) AS a(shape) CROSS JOIN (VALUES (geography::STGeomFromText('POLYGON((-122.351 47.656, -122.341 47.656, -122.341 47.661, -122.351 47.661, -122.351 47.656))', 4326))) AS b(shape);

Open Microsoft Learn for full syntax, permissions, and details for your version.