Export (0) Print
Expand All
Expand Minimize

STNumGeometries (geometry Data Type)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns the number of geometries that comprise a geometry instance.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database (Initial release through current release).

.STNumGeometries ( )

SQL Server return type: int

CLR return type: SqlInt32

This method returns 1 if the geometry instance is not a MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection instance, and 0 if the geometry instance is empty.

Note Note

If a GeometryCollection has nested empty elements, STNumGeometries() will not return 0. Though the elements in the GeometryCollection instance are empty, the instance itself is not an empty set.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft