简体   繁体   English

X()和Y()MySql函数以点字段作为参数返回哪种类型的数据

[英]What type of data are returned by the X() and Y() MySql functions that take a point field as parameter

I am not so into database. 我不是很喜欢数据库。 Into a geospatial query I have something like this: 进入地理空间查询,我有这样的东西:

SELECT X(gps) AS longitude, Y(gps) AS latitude FROM MyTable

Where the gps field hve point as type. 其中gps字段已指向类型。

And it returnes value like: 它返回的值如下:

29,3715    -2,1790

My doubt is: what is the exact type of data returned by the previous X() and Y() function? 我的疑问是:前一个X()Y()函数返回的确切数据类型是什么?

Looks like a double-precision number 看起来像是double-precision number

Here's the link , note that these functions are alias for st_x and st_y and are due for depreciation. 这是链接 ,请注意,这些函数是st_xst_y别名, st_x计提折旧。

Regards, 问候,

James 詹姆士

The documentation of MySQL function X() explains: MySQL函数X()的文档说明:

ST_X() and X() are synonyms. ST_X()X()是同义词。 For more information, see the description of ST_X() . 有关更多信息,请参见ST_X()的描述。

X() is deprecated as of MySQL 5.7.6 and will be removed in a future MySQL release. X()自MySQL 5.7.6起已弃用,并将在以后的MySQL版本中删除。
Use ST_X() instead. 使用ST_X()代替。

The documentation of ST_X() says: ST_X()的文档说:

ST_X(P)

Returns the X-coordinate value for the Point object p as a double-precision number. 以双精度数字形式返回Point对象p的X坐标值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM