存储过程变量声明 mysql使用存储过程,循环查找数据?

mysql使用存储过程,循环查找数据?Deleimer$$MySQL>mysql> create procedure myproc()//用于创建while循环的存储过程if branch语句

mysql使用存储过程,循环查找数据?

Deleimer$$MySQL>mysql> create procedure myproc()//用于创建while循环的存储过程if branch语句示例-> begin->-> clear I int-> set I=1-> loop1:当I if mod(I,2)0然后/*偶数-重试*/-> select concat(I,”是奇数“)-> end if-> set I=I 1-> end when loop1-> end$$query OK,0行受影响(0.00秒)