ST_LENGTH
Returns the length of a linear geometry. Calculates the total length of a LineString or MultiLineString in its associated spatial reference units.
Syntax
ST_LENGTH(ls)Description
Examples
SET @ls = 'LineString(1 1,2 2,3 3)';
SELECT ST_LENGTH(ST_GeomFromText(@ls));
+---------------------------------+
| ST_LENGTH(ST_GeomFromText(@ls)) |
+---------------------------------+
| 2.82842712474619 |
+---------------------------------+Last updated
Was this helpful?

