We help IT Professionals succeed at work.

CASE / SWITCH statement

shellasharma
shellasharma asked
on
Is there any CASE / SWITCH statement , that can be used
instead of ifelse statement...its complicated NESTED IF ELSE..CASE / SWITCH would improve performance....

Any help is highly appreciated...
Comment
Watch Question

There is currently NO support for any kind of CASE or SWITCH structure in PL/SQL.

The best you can do is to use IF...ELSIF...END IF;

ie. Rather than -

IF a THEN
  ...
ELSE
  IF b THEN
    ...
  ELSE
    ...
  END IF;
END IF;

do -

IF a THEN
  ...
ELSIF b THEN
  ...
ELSE
  ...
END IF;

Explore More ContentExplore courses, solutions, and other research materials related to this topic.