首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

存储过程的IF有关问题

2013-03-26 
存储过程的IF问题我想问下,oracle的存储过程中,能否在IF条件中,多写几个条件?类似JAVA那样 if(a2 || a

存储过程的IF问题
我想问下,oracle的存储过程中,能否在IF条件中,多写几个条件?

类似JAVA那样 if(a==2 || a==2....)这样。

因为我有一个存储过程要写IF,可以有很多个如果,但是就执行2种结果。我不想写很多if then elsif这样。

请问可以吗?谢了~~

[解决办法]
of course.

If a=1 or a=2 then

elsif 

else

end if;
[解决办法]
可以这么写
if (a<>1 or b<> 2 or c<> 3) and n>0 then 
elsif n>0 
then
else
end if;[code=SQL][/code]
[解决办法]
if (a<>1 or b<> 2 or c<> 3) and n>0 then
elsif n>0
then
else
end if;
[解决办法]
if a=2 or b=3 ... then
end if;
我的异常网推荐解决方案:oracle存储过程,http://www.myexception.cn/oracle-develop/177537.html

热点排行