how to solve syntax error in procedure in mysql?

Posted by Shooter on Stack Overflow See other posts from Stack Overflow or by Shooter
Published on 2011-02-21T06:39:28Z Indexed on 2011/02/21 7:25 UTC
Read the original article Hit count: 176

Filed under:
|

Hi all,
i am executing a procedure in mysql, procedure is-

delimiter $$
create procedure getFacility (in id int, out MyFacility VARCHAR(200))
begin
    select Facility into MyFacility 
        from facilities 
        where FacilityID = id ;
end $$
delimiter ;

and it is giving error below-

Error Code : 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 'end $$
delimiter' at line 1
(0 ms taken)

how to solve this error?

Thanks,
Yugal

© Stack Overflow or respective owner

Related posts about mysql

Related posts about stored-procedures