Skip to content Skip to sidebar Skip to footer

Map Column Data To A Value (oracle)

I have an Oracle database and I have a table named Car. I can select the Mileage of the cars like this: SELECT MILEAGE FROM CAR This gives me: 100 500 1000 etc. However, I woul

Solution 1:

You should use a CASE statement:

SELECT CASE
  WHEN MILEAGE > 1000 THEN 'High'
  ELSE 'Low'
  END
FROM CAR

Post a Comment for "Map Column Data To A Value (oracle)"