谁写过MySql的存储过程(带内部变量的)
raike 2004-11-05 11:43:48 DROP PROCEDURE IF EXISTS pro_test
CREATE procedure pro_test(p_uinfoid int(9), p_tautoid int(9),p_parent_id int(9))
as
v_existint int(9) //请问内部的声明变量怎么写?
v_corporation_count int(9) //这里总是报错 用Declare声明也不对啊
begin
SELECT v_exist=count(*) FROM t_corporation_table
where uinfo_id = p_uinfoid
and t_autoid = p_tautoid
and parent_id = p_parent_id;
..............
end
MySql提示这里出错:
v_existint int(9) //请问内部的声明变量怎么写?
v_corporation_count int(9) //这里总是报错 用Declare声明也不对啊