The ST_Y function returns the latitude of a POINT geography object.
Syntax
DOUBLE ST_Y(GEOGRAPHY <value>)Parameters
value: Required. A geography object of the POINT type. Use the ST_GEOGPOINT, ST_GEOGFROMWKB, or ST_GEOGFROMTEXT function to create this object.
Return value
Returns the latitude as a DOUBLE value.
Examples
SELECT ST_Y(ST_GEOGPOINT(1, 4));
-- Result:
+------------+
| _c0 |
+------------+
| 4.0 |
+------------+
SELECT ST_Y(ST_GEOGFROMTEXT('POINT (10 20)'));
-- Result:
+------------+
| _c0 |
+------------+
| 20.0 |
+------------+
SELECT ST_Y(ST_GEOGFROMWKB(x'0000000001400000000000000040100000000000000'));
-- Result:
+------------+
| _c0 |
+------------+
| 4.0 |
+------------+