5. Geospatial Functions : NumGeometries
 
Share this page                  
NumGeometries
NUMGEOMETRIES(g Geometrycollection)
Alias: ST_NUMGEOMETRIES
Returns the number of objects in g.
Result type: integer
Examples:
SELECT NUMGEOMETRIES(MPOINTFROMTEXT('MULTIPOINT(1 1, 2 2, 3 3)'));
-------------
col1
-------------
3
-------------