Calculates the shortest distance between two geometries. Returns the minimum Euclidean distance between any two points in the geometries.
SELECT ST_Distance(POINT(1,2),POINT(2,2));
+------------------------------------+
| ST_Distance(POINT(1,2),POINT(2,2)) |
+------------------------------------+
| 1 |
+------------------------------------+