How do I set a stored procedure?
It has been solved using.

function  hook_install(){

db_query("CREATE PROCEDURE xyz()

BEGIN
    set @num := 0, @termid := 0; 
    ......................................");