Back to Playground Home

Compute the distance between two points

select stAsText(bytes_field),
       ST_Distance(bytes_field, ST_POINT(2.154007,41.390205, 1)) AS distanceInMetres
from users
ORDER BY distanceInMetres