mysql条件控制
if(语句1,语句2,语句3)如果语句1为真 则执行语句2 否则执行语句3
case 变量或者表达式
when 值1 then 语句1;
when 值2 then 语句2;
....
else 语句n;
end
case
when 条件1 then 语句1;
when 条件2 then 语句2;
...
else 语句3
end
if结构 只能放在begin end中
if 条件1 then 语句1;
else if 条件2 then 语句2;
...
else 语句n;
end if;

浙公网安备 33010602011771号