Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle case

SELECT product_id, product_type_id,
  CASE product_type_id
    WHEN 1 THEN 'Book'
    WHEN 2 THEN 'Video'
    WHEN 3 THEN 'DVD'
    WHEN 4 THEN 'CD'
    ELSE 'Magazine'
  END
FROM products;
Source by www.mastertraining.com.br #
 
PREVIOUS NEXT
Tagged: #oracle #case
ADD COMMENT
Topic
Name
5+4 =