ST_Length
ST_LENGTH(g Geometry)
Returns the length of g. Use for linestrings. For polygons, use PERIMETER().
Result type: float
Note: You cannot call this function with simply LENGTH because it is used elsewhere in SQL; you must use ST_LENGTH.
SELECT ST_LENGTH(LINEFROMTEXT('LINESTRING(1 1,1 2,3 2)'));
-------------
col1
-------------
3.000
-------------
Last modified date: 01/30/2023