Link to home
Start Free TrialLog in
Avatar of Amit
AmitFlag for United States of America

asked on

Is CASE Statement ANSI Standard or is specific to databases

Hi,

Is the implementation of CASE statement in SQL ANSI Standard or each database has a standard of its own when using case statement

For example if a table column say recipe_class returns when doing a select

Main course
Vegetable
Starch
Salad
Hors d'oeuvres
Dessert
Soup

then How do I do case in all kinds of databases that will do this

case 'Main Course' then 'M'
case 'Vegetable' then 'V'
else  'EX'


thanks
-anshu
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial