Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 33.9Mb
PDF (A4) - 34.0Mb
PDF (RPM) - 33.2Mb
EPUB - 8.5Mb
HTML Download (TGZ) - 8.2Mb
HTML Download (Zip) - 8.2Mb
HTML Download (RPM) - 7.1Mb
Eclipse Doc Plugin (TGZ) - 9.0Mb
Eclipse Doc Plugin (Zip) - 11.1Mb
Man Pages (TGZ) - 219.4Kb
Man Pages (Zip) - 322.3Kb
Info (Gzip) - 3.2Mb
Info (Zip) - 3.2Mb
Excerpts from this Manual

12.15.7.2 Point Property Functions

A Point consists of X and Y coordinates, which may be obtained using the following functions:

  • ST_X(p)

    Returns the X-coordinate value for the Point object p as a double-precision number.

    mysql> SELECT ST_X(POINT(56.7, 53.34));
    +--------------------------+
    | ST_X(POINT(56.7, 53.34)) |
    +--------------------------+
    |                     56.7 |
    +--------------------------+
    

    ST_X() and X() are synonyms.

  • ST_Y(p)

    Returns the Y-coordinate value for the Point object p as a double-precision number.

    mysql> SELECT ST_Y(POINT(56.7, 53.34));
    +--------------------------+
    | ST_Y(POINT(56.7, 53.34)) |
    +--------------------------+
    |                    53.34 |
    +--------------------------+
    

    ST_Y() and Y() are synonyms.

  • X(p)

    ST_X() and X() are synonyms. For more information, see the description of ST_X().

    X() is deprecated as of MySQL 5.7.6 and will be removed in a future MySQL release. Use ST_X() instead.

  • Y(p)

    ST_Y() and Y() are synonyms. For more information, see the description of ST_Y().

    Y() is deprecated as of MySQL 5.7.6 and will be removed in a future MySQL release. Use ST_Y() instead.


User Comments
Sign Up Login You must be logged in to post a comment.