October 27, 2024
Chicago 12, Melborne City, USA
SQL

Can I use a subquery inside of decode()?


Given this expression:

DECODE(SUBSTR(T.CARD_NUMBER, 1, 1),
       '4',
       'VISA',
       '2',
       'MasterCard',
       T.SCHEME)

Is it allowed to use a subquery that fetches values from a table instead of the constants?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video