All Products
Search
Document Center

ApsaraDB RDS:ST_X

Last Updated:Mar 28, 2026

Returns the X coordinate of a point geometry.

Syntax

float ST_X(geometry aPoint);

Parameters

ParameterDescription
aPointThe point geometry to query.

Usage notes

  • The input must be a point geometry.

  • If the geometry is unavailable or invalid, ST_X returns NULL.

  • ST_X supports 3D geometries and preserves Z coordinates.

Examples

SELECT ST_X('POINT(0 1 2 3)'::geometry);
 st_x
------
    0
(1 row)