比如我想用mysql存储过程实现下面程序语句的功能
程序代码:
if()
{
    if()
    {
    }else if()
    {
    }}else if()
{
}存储过程写法:
if ... then 
     if ... then
     else if ... then
     end if;
else if  ... then
end if;这样写报错,求指教正确的应该怎么写?