Hard to Get

--人生在世 难得二字

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

PL/SQL Best Practices [12][If Statements]-ELSIF clauses

The implication of ELSIF clauses is that if one condition is fulfilled, all others would fail -- they are mutually exclusive. The following IF statement is a classic misuse of ELSIF clauses. It might not cause any errors, but that would just be a matter of luck. In many cases, the issue of exclusivity is less obviously determined.

IF sal BETWEEN 0 AND 10000
THEN
   
ELSIF sal 
BETWEEN 10000 AND 20000
THEN
   
ELSIF sal 
BETWEEN 20000 AND 30000
THEN
   
END IF;
posted on 2005-09-13 21:38  Del  阅读(181)  评论(0)    收藏  举报