Skip to content
Advertisement

Fetching Multipoint Spatial Data in MySQL

I didn’t find any answer how to select every point in multipoint data type in MySQL. I have multipoint that contains many points and I want to select every point by query and I can’t figure it out. Any ideas?

Table structure: Image

Example data: Image

In MySQL documentation I’ve found only this, but it didn’t help: https://dev.mysql.com/doc/refman/8.0/en/fetching-spatial-data.html

Advertisement

Answer

If you are using MySQL >= 8.0.2, an option may be:

See db-fiddle.

UPDATE

See db-fiddle.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement