Was this helpful?
GeometryN
GEOMETRYN(g Geometrycollection, n interger)
Alias: ST_GEOMETRYN
Returns the nth object from g.
Result type: geometry
Example:
SELECT ASTEXT(GEOMETRYN(MLINEFROMTEXT('MULTILINESTRING((1 1, 9 1), (2 2, 8 2))'), 2));
--------------------------------
col1
--------------------------------
LINESTRING (2 2, 8 2)
--------------------------------
Last modified date: 04/03/2024