I am trying to define stored procedure in mysql but getting error i am unable to understand what i am doing wrong.
CREATE PROCEDURE distance(lat1 Float,long1 Float,lat2 Float,long2 Float,OUT distance Float)
BEGIN
SET distance = ROUND((ACOS(SIN(RADIANS(lat1))*SIN(RADIANS(lat2))+COS(RADIANS(lat1))*COS(RADIANS(lat2))*COS(RADIANS(lon2-lon1)))*6371), 2);
END
ERROR:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4