Documentation Home
MySQL 5.6 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 31.0Mb
PDF (A4) - 31.1Mb
PDF (RPM) - 30.3Mb
EPUB - 7.8Mb
HTML Download (TGZ) - 7.6Mb
HTML Download (Zip) - 7.6Mb
HTML Download (RPM) - 6.5Mb
Eclipse Doc Plugin (TGZ) - 8.3Mb
Eclipse Doc Plugin (Zip) - 10.1Mb
Man Pages (TGZ) - 181.9Kb
Man Pages (Zip) - 293.2Kb
Info (Gzip) - 2.9Mb
Info (Zip) - 2.9Mb
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_X() was added in MySQL 5.6.1.

  • 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.

    ST_Y() was added in MySQL 5.6.1.

  • X(p)

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

  • Y(p)

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


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