I have table areas with column id, name, position. The column position is of POINT type and stores (latitude, longitude) of the place.
I read a solution to find nearest places using point datatype and st_distance_sphere in MySQL here. But when I run following query in mysql workbench, i get message: OK. I want to see all the rows that match this criteria.
select
id,name,
st_distance_sphere(`position`, st_geomfromtext('Point(77.058210 28.632955)', 4326)) as distance
from areas
order by distance asc;