By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
select version();
version() |
---|
8.0.23 |
SET @pt1 = ST_GeomFromText('POINT(0 0)');
SET @pt2 = ST_GeomFromText('POINT(0 1)');
SELECT ST_Distance_Sphere(@pt1, @pt1, 0);
show warnings
Level | Code | Message |
---|---|---|
Error | 3706 | Invalid radius provided to function st_distance_sphere: Radius must be greater than zero. |
SELECT ST_Distance_Sphere(@pt1, @pt2, 1);
ST_Distance_Sphere(@pt1, @pt2, 1) |
---|
0.017453292519943295 |
SELECT ST_Distance_Sphere(@pt1, @pt2, NULL);
ST_Distance_Sphere(@pt1, @pt2, NULL) |
---|
null |
show warnings