Skip to main content
Extracts the longitude coordinate of a GEOGRAPHY Point. Returns NULL for empty geography objects. Returns an error if the input is not a single Point (and not an empty GEOGRAPHY object).

Syntax

Parameters

Return Type

ST_X returns a value of type DOUBLE PRECISION.

Example

The following code example constructs a Point in the GEOGRAPHY data type from longitude and latitude coordinates and extracts its longitude coordinate:

Rows: 1Execution time: 5.46ms