- create procedure test(in a int)
- if a > 1 then
- select 1;
- elseif a>2 then
- select 2;
- else
- end if;
- create procedure test(in a int)
- if a > 1 then
- select 1;
- elseif a>2 then
- select 2;
- else
- end if;
应改成以下这样:
- create procedure test(in a int)
- if a > 1 then
- select 1;
- elseif a>2 then
- select 2;
- else
- -- do nothing --
- set @tmp=1;
- end if;