geography.STIsEmpty
spatial predicate STIsEmpty
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
.STIsEmpty ( )
Work example
Use geography.STIsEmpty to check whether a spatial value contains no points.
Use SQL IS NULL for a missing value and this method for an empty instance. Keep the geography type and SRID in the review.
Check your work The constructed empty GeometryCollection returns 1; an empty instance is different from SQL NULL.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT e.shape.STIsEmpty() AS is_empty FROM (VALUES (geography::STGeomFromText('GEOMETRYCOLLECTION EMPTY', 4326))) AS e(shape);
Open Microsoft Learn for full syntax, permissions, and details for your version.