create procedure repairChild(in uid int, in type_get char(6))
begin
declare userCusor cursor for select uid from by_users……
if uid = 0 then
……
else
……
end if;
end
我需要根据传进来的uid生成userCusor光标,可是mysql declare语句必须放在开头,有什么办法实现吗?
begin
declare userCusor cursor for select uid from by_users……
if uid = 0 then
……
else
……
end if;
end
我需要根据传进来的uid生成userCusor光标,可是mysql declare语句必须放在开头,有什么办法实现吗?
....
create table lsb as select * from by_users where id=uid
.....