geography.STDisjoint
spatial predicate STDisjoint
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
.STDisjoint ( other_geography )
Work example
Use geography.STDisjoint to test whether two shapes share no points.
Check matching SRIDs and compare with STIntersects for the same pair. Confirm both values use the same SRID before comparing or combining them.
Check your work The Seattle and London points do not intersect, so the predicate returns 1.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT a.shape.STDisjoint(b.shape) AS shapes_are_disjoint FROM (VALUES (geography::Point(47.651, -122.349, 4326))) AS a(shape) CROSS JOIN (VALUES (geography::Point(51.5072, -0.1276, 4326))) AS b(shape);
Open Microsoft Learn for full syntax, permissions, and details for your version.