Comments - ST_Y

5 years, 5 months ago Andrew D

ST_Y(point) returns a scalar number, not a Geometry type. Do not try to cast it from a WKB to Text or it will return NULL without errors or warnings!

The same is probably true for ST_X(), ST_Z(), and ST_M().


MariaDB [db]> select ST_Y(GeomFromText('POINT(-1 1504310400)'));


MariaDB [db]> select ST_AsText(ST_Y(GeomFromText('POINT(-1 1504310400)')));

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.