SQL Flow Field Guide

geometry.STIntersects

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

spatial predicate STIntersects

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

.STIntersects ( other_geometry )

Work example

Use geometry.STIntersects to test whether two shapes share at least one point.

Check matching SRIDs and consider a spatial index for supported table predicates. Confirm both values use the same SRID before comparing or combining them.

Check your work The result is nullable bit, so test explicitly for 1. Incompatible SRIDs can make a two-instance result null. For this geometry result, verify coordinate units in the planar reference.

Practice SQL

Open in SQL Flow
SELECT geometry::STGeomFromText('POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))', 0).STIntersects(geometry::Point(2, 2, 0)) AS intersects;

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