Skip to content
Advertisement

Oracle SQL ternary operator or function?

Is there a simple Oracle syntax like a ternary operator or function?

These work:

If there’s a simpler, shorter syntax I would like to know.

Advertisement

Answer

You can use a CASE expression with LIKE:

or DECODE and INSTR:

or just simply use LIKE:

INSTR:

or REGEXP_LIKE:

db<>fiddle here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement