Advertisement
jbonanno

If statement and scalar variable

Jul 11th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.29 KB | None | 0 0
  1. DECLARE
  2. lv_purchase_num NUMBER (3);
  3. lv_rating CHAR (4);
  4. BEGIN
  5. IF lv_purchase_num > 200 THEN
  6. lv_rating  := ‘HIGH’;
  7. ELSEIF lv_purchase_num < 200 AND lv_purchase_num > 100 THEN
  8. lv_rating  := ‘MID’;
  9. ELSE
  10. lv_rating  := ‘LOW’;
  11. END IF;
  12. DBMS_OUTPUT.PUT_LINE(lv_rating);
  13. END;
  14. /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement