Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.24 KB

stnumgeometries-geometry-data-type.md

File metadata and controls

42 lines (31 loc) · 1.24 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
STNumGeometries (geometry Data Type)
STNumGeometries (geometry Data Type)
MladjoA
mlandzic
08/03/2017
sql
t-sql
reference
STNumGeometries (geometry Data Type)
STNumGeometries_TSQL
STNumGeometries (geometry Data Type)
TSQL

STNumGeometries (geometry Data Type)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]

Returns the number of geometries that comprise a geometry instance.

Syntax

  
.STNumGeometries ( )  

Return Types

[!INCLUDEssNoVersion] return type: int

CLR return type: SqlInt32

Remarks

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

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.