ST_ExteriorRing(poly)

Returns the exterior ring of the Polygon value poly as a LineString.

ST_ExteriorRing() handles its arguments as described in the
introduction to this section.

URL: https://dev.mysql.com/doc/refman/8.0/en/gis-polygon-property-functions.html

