1. 程式人生 > >oracle儲存過程中的if...elseif...else用法

oracle儲存過程中的if...elseif...else用法

if ... then 
...   
elsif ... then 
...   

else 
...   
end if;   
    

or     
if ... then     
  ...   
else 
...   
end if;   
    
or     
if ... then 
...   
end if;

注:if後的條件不加括號

例子如下:
           if   p_fh <> ''   then
               p_strsql := p_strsql || ' and b.fh = p_fh';
           end if;