The ST_Y function takes a point as an
input parameter and returns its Y coordinate. You can optionally indicate
a Y coordinate as input parameter in addition to the point and the
function returns the point itself with its Y coordinate set to the
specified value.
If the specified point is null or is empty, then null is returned.
Syntax
Parameters
point
A value of type ST_Point for which the Y coordinate is returned
or modified.
y_coordinate
A value of type DOUBLE that represents the new Y coordinate for point.
Return types
DOUBLE, if y_coordinate is not specified
ST_Point, if y_coordinate is specified
Examples
Example 1
This example illustrates use of the ST_Y function. Geometries
are created and inserted into the SAMPLE_POINTS table.