📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ST_Y



Returns the latitude (Y coordinate) of a Point represented by a GEOMETRY or GEOGRAPHY object.

Syntax

ST_Y(<geometry_or_geography>)

Arguments

ArgumentsDescription
<geometry_or_geography>The argument must be an expression of type GEOMETRY or GEOGRAPHY and must contain a Point.

Return Type

Double.

Examples

GEOMETRY examples

SELECT ST_Y( ST_MAKEGEOMPOINT( 37.5, 45.5 ) ) AS pipeline_y; ┌────────────┐ │ pipeline_y │ ├────────────┤ │ 45.5 │ └────────────┘

GEOGRAPHY examples

SELECT ST_Y( ST_GEOGFROMWKT( 'POINT(37.5 45.5)' ) ) AS pipeline_y; ┌────────────┐ │ pipeline_y │ ├────────────┤ │ 45.5 │ └────────────┘

Was this page helpful?